mingwwxwidgetscodelite

Can't build the new wxWidgets. What should i do?


I'm feeling a bit dumb, but i can't build the new wxWidgets. I want to use codelite + mingw + wxWidgets, so i download the latest releases:

CodeLite 9.1.3 (http://downloads.codelite.org/downloads.php?windows_weekly_64)

The installer make me download the TDM-GCC-64 setup and install it.

Then i downloaded wxWidgets-3.1.0 (https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxMSW-3.1.0-Setup.exe)

Codelite detected the the compiler, now i should build the wxWidgets, but the pages i've googled for (wxW wiki, codelite docs, etc) refers to folders and files that does'nt exist. Everything is installed in the default folders, and i'm not a PC noob, while perhaps too used to environments like C++Builder etc.

What should i do now?


UPDATE

I'm sorry i'm not able to be clear. Let me try again with the output:

C:\wxWidgets-3.1.0\build\msw>mingw32-make -j8 -f Makefile.gcc SHARED=1 UNICODE=1 BUILD=release VENDOR=cl CXXFLAGS="-fno-keep-inline-dllexport -std=c++11" MONOLITHIC=1
if not exist gcc_mswudll mkdir gcc_mswudll
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
if not exist ..\..\lib\gcc_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\gcc_dll\mswu\wx\setup.h
gcc -c -o gcc_mswudll\wxregex_regcomp.o  -O2 -mthreads  -DHAVE_W32API_H -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswu -D__WXMSW__  -D_UNICODE   -MTgcc_mswudll\wxregex_regcomp.o -MFgcc_mswudll\wxre
gex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
Impossibile trovare il percorso specificato.
        0 file copiati.
Makefile.gcc:5728: recipe for target '..\..\lib\gcc_dll\mswu\wx\setup.h' failed
mingw32-make: *** [..\..\lib\gcc_dll\mswu\wx\setup.h] Error 1
mingw32-make: *** Waiting for unfinished jobs....
In file included from ..\..\include/wx/defs.h:20:0,
                 from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
..\..\include/wx/platform.h:136:22: fatal error: wx/setup.h: No such file or directory
 #include "wx/setup.h"
                      ^
compilation terminated.
Makefile.gcc:5778: recipe for target 'gcc_mswudll\wxregex_regcomp.o' failed
mingw32-make: *** [gcc_mswudll\wxregex_regcomp.o] Error 1

I may be wrong, but seems to me that these two lines

if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
if not exist ..\..\lib\gcc_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\gcc_dll\mswu\wx\setup.h

shows that there's a problem.

Now, i've made the directory myself and copied the setup.h in. At my home it was'nt still building, but i can't recall why, while right now, at office, it start building, but ended with this:

......
g++ -c -o gcc_mswudll\wxscintilla_LexCOBOL.o  -O2 -mthreads  -DHAVE_W32API_H -DNDEBUG -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ -DSCI_LE
XER -DLINK_LEXERS -I..\..\lib\gcc_dll\mswu -I..\..\include  -D__WXMSW__   -D_UNICODE    -fno-keep-inline-dllexport -std=c++11 -MTgcc_mswudll\wxscintilla_LexCOBOL.o -MFgcc_mswudll\wxscintilla_LexCOBOL.
o.d -MD -MP ../../src/stc/scintilla/lexers/LexCOBOL.cxx
In file included from c:\sviluppo\tools\mingw\lib\gcc\mingw32\4.8.1\include\c++\cmath:44:0,
                 from c:\sviluppo\tools\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:38,
                 from c:\sviluppo\tools\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\sviluppo\tools\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from ../../src/stc/scintilla/lexers/LexBibTeX.cxx:18:
c:\sviluppo\tools\mingw\include\math.h: In function 'float hypotf(float, float)':
c:\sviluppo\tools\mingw\include\math.h:635:30: error: '_hypot' was not declared in this scope
 { return (float)(_hypot (x, y)); }
                              ^
g++ -c -o gcc_mswudll\wxscintilla_LexCoffeeScript.o  -O2 -mthreads  -DHAVE_W32API_H -DNDEBUG -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ -
DSCI_LEXER -DLINK_LEXERS -I..\..\lib\gcc_dll\mswu -I..\..\include  -D__WXMSW__   -D_UNICODE    -fno-keep-inline-dllexport -std=c++11 -MTgcc_mswudll\wxscintilla_LexCoffeeScript.o -MFgcc_mswudll\wxscint
illa_LexCoffeeScript.o.d -MD -MP ../../src/stc/scintilla/lexers/LexCoffeeScript.cxx
Makefile.gcc:6183: recipe for target 'gcc_mswudll\wxscintilla_LexBibTeX.o' failed
mingw32-make: *** [gcc_mswudll\wxscintilla_LexBibTeX.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....

C:\wxWidgets-3.1.0\build\msw>

So, we're still not building the wxWidgets.


UPDATE:

tried to make a debug build as suggested in the answer. this is the output:

C:\wxWidgets-3.1.0\build\msw> mingw32-make -j8 -f Makefile.gcc SHARED=1 UNICODE=
1 BUILD=debug VENDOR=cl CXXFLAGS="-fno-keep-inline-dllexport -std=c++11" MONOLIT
HIC=1
if not exist gcc_mswuddll mkdir gcc_mswuddll
if not exist ..\..\lib\gcc_dll\mswud mkdir ..\..\lib\gcc_dll\mswud
if not exist ..\..\lib\gcc_dll\mswud\wx\setup.h copy ..\..\include\wx\msw\setup.
h ..\..\lib\gcc_dll\mswud\wx\setup.h
gcc -c -o gcc_mswuddll\wxregex_regcomp.o -g -O0 -mthreads  -DHAVE_W32API_H -DNDE
BUG -I..\..\include -I..\..\lib\gcc_dll\mswud -D__WXMSW__  -D_UNICODE   -MTgcc_m
swuddll\wxregex_regcomp.o -MFgcc_mswuddll\wxregex_regcomp.o.d -MD -MP ../../src/
regex/regcomp.c
Impossibile trovare il percorso specificato.
        0 file copiati.
Makefile.gcc:5728: recipe for target '..\..\lib\gcc_dll\mswud\wx\setup.h' failed

mingw32-make: *** [..\..\lib\gcc_dll\mswud\wx\setup.h] Error 1
mingw32-make: *** Waiting for unfinished jobs....
In file included from ..\..\include/wx/defs.h:20:0,
                 from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
..\..\include/wx/platform.h:136:22: fatal error: wx/setup.h: No such file or dir
ectory
compilation terminated.
Makefile.gcc:5778: recipe for target 'gcc_mswuddll\wxregex_regcomp.o' failed
mingw32-make: *** [gcc_mswuddll\wxregex_regcomp.o] Error 1

The file is there, so i don't know what's the problem...

C:\wxWidgets-3.1.0\build\msw>dir ..\..\src\regex\regcomp.*
 Il volume nell'unità C è 1TBWD-1-WIN7 64
 Numero di serie del volume: A26D-1E3B

 Directory di C:\wxWidgets-3.1.0\src\regex

28/02/2016  22:33            59.702 regcomp.c
               1 File         59.702 byte
               0 Directory  74.986.561.536 byte disponibili

C:\wxWidgets-3.1.0\build\msw>

Solution

  • The installer make me download the TDM-GCC-64 setup and install it.

    CodeLite suggests...

    What should i do now?

    Build wxWidgets like this:

    After you have built wxWidgets, you need to set 2 environment variables in CodeLite from: (Settings->Environment variables):

    WXCFG=gcc_dll\mswu WXWIN=\path\to\wxWidgets

    If you attempt to build the Debug configuration of your project in CodeLite, you should do ONE of the following:

    Build a debug version of wxWidgets (this is what CodeLite will search)

    OR

    Remove --debug flag from the compiler and linker options:

    1. Project Settings->Compiler->C++ Compiler Options, and remove the part that says --debug=yes or just --debug
    2. Project Settings->Linker->Linker options, and remove the part that says --debug=yes or just --debug

    EDIT: Update CodeLite's wiki page link

    EDIT2: Added PATH instructions to the answer

    EDIT3: Added instructions on how to set the environment variables WXCFG and WXWIN

    Eran