Author Topic: CodeBlocks Compiling  (Read 176 times)

Offline gagraceffa

  • Single posting newcomer
  • *
  • Posts: 1
CodeBlocks Compiling
« on: November 27, 2017, 02:02:25 pm »
Hi all
I'm trying to compile the latest release of CodeBlocks on Windows but I get errors in compiling. I want to understand which versions of MinGW, WXwidget and CodeBlocks do I need to successfully compile. The error messages are like the following:

||=== Build: tinyXML in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: AutoRevision in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: ConsoleRunner in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Squirrel in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Squirrel std lib in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: SqPlus in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: scintilla in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: wxpropgrid in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: sdk in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: src in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Abbreviations in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: AStyle in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Autosave in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Compiler depslib in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Compiler in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Debugger in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Code-completion in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
C:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll\mswu\wx\setup.h|207|warning: "wxUSE_STL" redefined|
:0|0|note: this is the location of the previous definition|
C:\wxMSW-2.8.12\wxMSW-2.8.12\include\wx\msw\private.h||In destructor 'ClassRegistrar::~ClassRegistrar()':|
C:\wxMSW-2.8.12\wxMSW-2.8.12\include\wx\msw\private.h|695|error: cannot convert 'wxString' to 'LPCSTR {aka const char*}' for argument '1' to 'BOOL UnregisterClassA(LPCSTR, HINSTANCE)'|
C:\wxMSW-2.8.12\wxMSW-2.8.12\include\wx\msw\private.h||In function 'wxString wxGetFullModuleName(HMODULE)':|
C:\wxMSW-2.8.12\wxMSW-2.8.12\include\wx\msw\private.h|781|error: cannot convert 'wxStringBuffer' to 'LPSTR {aka char*}' for argument '2' to 'DWORD GetModuleFileNameA(HINSTANCE, LPSTR, DWORD)'|
||=== Build failed: 2 error(s), 1 warning(s) (0 minute(s), 18 second(s)) ===|

Many thanks

Giacomo

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5991
    • My Best Post
Re: CodeBlocks Compiling
« Reply #1 on: November 27, 2017, 03:18:46 pm »
If you are trying to build Code::Blocks using wxUSE_STL=1 you are likely going to fail no matter what versions you use.

I would suggest wxWidgets version 3.0.3 and what ever GCC mingw compiler version you wish to try that is at least as new as the GCC compiler that was package with CB 16.01. I think it was GCC 4.9.2 TDM 32 bit.

Note: Most MinGW64 GCC compilers have issues building monolithic wxWidgets (except for TDM builds) needed by the Code::Blocks projects under windows OS.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org