User forums > Help

Compile Errors when building Code::Blocks source

(1/3) > >>

GameCodingNinja:
I'm one of those crazy people who compile their own Linux via "Linux From Scratch" so the only way I'm going to be able to try your IDE is if I compile the source code. Since I've recently built my current Linux I'm running on, I'm using the newest compiler available (gcc 6.2.0). That may or may not be contributing to the problem. I'm also using the newest wxWidgets (3.1.0).

Attached is the results of the configure.

The compile didn't get to far before it error-ed out.

--- Code: ---In file included from /usr/include/c++/6.2.0/type_traits:35:0,
                 from /usr/include/wx-3.1/wx/strvararg.h:22,
                 from /usr/include/wx-3.1/wx/string.h:37,
                 from /usr/include/wx-3.1/wx/memory.h:15,
                 from /usr/include/wx-3.1/wx/object.h:19,
                 from /usr/include/wx-3.1/wx/wx.h:15,
                 from /usr/include/wx-3.1/wx/wxprec.h:42,
                 from ./sdk_common.h:37,
                 from ./sdk_precomp.h:13:
/usr/include/c++/6.2.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^~~~~
In file included from /usr/include/wx-3.1/wx/string.h:37:0,
                 from /usr/include/wx-3.1/wx/memory.h:15,
                 from /usr/include/wx-3.1/wx/object.h:19,
                 from /usr/include/wx-3.1/wx/wx.h:15,
                 from /usr/include/wx-3.1/wx/wxprec.h:42,
                 from ./sdk_common.h:37,
                 from ./sdk_precomp.h:13:
/usr/include/wx-3.1/wx/strvararg.h:345:18: error: ‘is_enum’ in namespace ‘std’ does not name a template type
     typedef std::is_enum<T> is_enum;
                  ^~~~~~~
/usr/include/wx-3.1/wx/strvararg.h:349:54: error: ‘is_enum’ was not declared in this scope
     enum { value = wxFormatStringSpecifierNonPodType<is_enum::value>::value };
                                                      ^~~~~~~
/usr/include/wx-3.1/wx/strvararg.h:349:68: error: template argument 1 is invalid
     enum { value = wxFormatStringSpecifierNonPodType<is_enum::value>::value };
                                                                    ^
make[2]: *** [Makefile:986: sdk_precomp.h.gch] Error 1
make[2]: Leaving directory '/root/Downloads/codeblocks-16.01.release/src/include'
make[1]: *** [Makefile:522: all-recursive] Error 1
make[1]: Leaving directory '/root/Downloads/codeblocks-16.01.release/src'
make: *** [Makefile:564: all-recursive] Error 1

--- End code ---

Any help or patches would be appreciated.  ;D

sodev:

--- Quote from: GameCodingNinja on February 10, 2017, 03:56:54 pm ---

--- Code: ---/usr/include/c++/6.2.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

--- End code ---

--- End quote ---

For some reason C++11 is not enabled, might be a problem with configure or something else. You could try the latest CodeBlocks version from svn, but i doubt you will have much luck with your configuration. At least on Windows CodeBlocks is still not usable with wxWidgets > 2.8.12, and with MinGW-w64 6.2.0 i can't compile wxWidgets 2.8.12 anymore, at least not in a way that it doesn't crash :).

oBFusCATed:
GameCodingNinja: use the latest trunk sources or switch to wx3.0. wx3.1 is the development version. Or recompile your wx3.1 in a way that doesn't require enabled c++11 support.

yvesdm3000:
You're not so crazy since I build codeblocks for myself too because I don't have root access on my professional development machine

You can do:
export CXXFLAGS="-std=c++11"
configure
make

which kinda forces C++11 support.

Yves

GameCodingNinja:
Thanks for all your help!

export CXXFLAGS="-std=c++11" was the kicker. It compiled. I initially tried doing ./configure CXXFLAGS="-std=c++11" but that didn't work.

The IDE ran but crashed. I'm sure it's related to wxWidgets (3.1.0). I'm going to fall back to 2.8.12.

I'm now trying to figure out which plugins I want to build.

Navigation

[0] Message Index

[#] Next page

Go to full version