I try default example from code::blocks 10.05 with wxWidgets 2.8.10 .
I install wxWidgets 2.8.10 under C:\ .
I set var wx with gui template .
But i try to build i got this error :
-------------- Clean: Debug in wx2810-test01 ---------------
Cleaned "wx2810-test01 - Debug"
-------------- Build: Debug in wx2810-test01 ---------------
Compiling: resource.rc
Compiling: wx2810_test01App.cpp
In file included from C:\wxWidgets-2.8.10\include/wx/defs.h:21,
from C:\wxWidgets-2.8.10\include/wx/event.h:15,
from C:\wxWidgets-2.8.10\include/wx/app.h:20,
from D:\cata\wx2810-test01\wx2810_test01App.h:13,
from D:\cata\wx2810-test01\wx2810_test01App.cpp:18:
C:\wxWidgets-2.8.10\include/wx/platform.h:196:22: error: wx/setup.h: No such file or directory
In file included from C:\wxWidgets-2.8.10\include/wx/platform.h:293,
from C:\wxWidgets-2.8.10\include/wx/defs.h:21,
from C:\wxWidgets-2.8.10\include/wx/event.h:15,
from C:\wxWidgets-2.8.10\include/wx/app.h:20,
from D:\cata\wx2810-test01\wx2810_test01App.h:13,
from D:\cata\wx2810-test01\wx2810_test01App.cpp:18:
C:\wxWidgets-2.8.10\include/wx/chkconf.h:103:9: error: #error "wxUSE_DYNLIB_CLASS must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:111:9: error: #error "wxUSE_EXCEPTIONS must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:119:9: error: #error "wxUSE_FILESYSTEM must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:127:9: error: #error "wxUSE_FS_ARCHIVE must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:140:9: error: #error "wxUSE_DYNAMIC_LOADER must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:148:9: error: #error "wxUSE_LOG must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:156:9: error: #error "wxUSE_LONGLONG must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:164:9: error: #error "wxUSE_MIMETYPE must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:180:9: error: #error "wxUSE_PRINTF_POS_PARAMS must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:188:9: error: #error "wxUSE_PROTOCOL must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:230:9: error: #error "wxUSE_REGEX must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:238:9: error: #error "wxUSE_STDPATHS must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:246:9: error: #error "wxUSE_XML must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:254:9: error: #error "wxUSE_SOCKETS must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:262:9: error: #error "wxUSE_STREAMS must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:270:9: error: #error "wxUSE_STOPWATCH must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:278:9: error: #error "wxUSE_TEXTBUFFER must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:286:9: error: #error "wxUSE_TEXTFILE must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:302:9: error: #error "wxUSE_URL must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:310:9: error: #error "wxUSE_VARIANT must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:330:9: error: #error "wxUSE_ABOUTDLG must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:338:9: error: #error "wxUSE_ACCEL must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:346:9: error: #error "wxUSE_ANIMATIONCTRL must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:354:9: error: #error "wxUSE_BITMAPCOMBOBOX must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:362:9: error: #error "wxUSE_BMPBUTTON must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:370:9: error: #error "wxUSE_BUTTON must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:378:9: error: #error "wxUSE_CALENDARCTRL must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:386:9: error: #error "wxUSE_CARET must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:394:9: error: #error "wxUSE_CHECKBOX must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:410:9: error: #error "wxUSE_CHOICE must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:418:9: error: #error "wxUSE_CHOICEBOOK must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:426:9: error: #error "wxUSE_CHOICEDLG must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:434:9: error: #error "wxUSE_CLIPBOARD must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:442:9: error: #error "wxUSE_COLLPANE must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:450:9: error: #error "wxUSE_COLOURDLG must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:458:9: error: #error "wxUSE_COLOURPICKERCTRL must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:466:9: error: #error "wxUSE_COMBOBOX must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:474:9: error: #error "wxUSE_COMBOCTRL must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:482:9: error: #error "wxUSE_DATAOBJ must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:490:9: error: #error "wxUSE_DATAVIEWCTRL must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:498:9: error: #error "wxUSE_DATEPICKCTRL must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:506:9: error: #error "wxUSE_DIRPICKERCTRL must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:514:9: error: #error "wxUSE_DISPLAY must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:522:9: error: #error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:530:9: error: #error "wxUSE_FILEDLG must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:538:9: error: #error "wxUSE_FILEPICKERCTRL must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:546:9: error: #error "wxUSE_FONTDLG must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:554:9: error: #error "wxUSE_FONTMAP must be defined."
C:\wxWidgets-2.8.10\include/wx/chkconf.h:562:9: error: #error "wxUSE_FONTPICKERCTRL must be defined."
I read this page http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef , but nothing clear to me .
It say :
I get errors like "wx/setup.h: No such file or directory"
You're missing an important compiler search path in your build options. Make sure you choose the correct wxWidgets build configuration when running the wxWidgets project wizard. If re-running the wizard isn't an option, then open your project's build options and add "$(#wx.lib)\gcc_dll\mswu" (assuming a monolithic Unicode DLL build) to the compiler search paths.
But this folder is not on my folder install .
Did you build wxWidgets, if not, do it as described on the wiki-page (http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef#Build_wxWidgets).
Yes . I build that and i make more steps .
Like set under Linker .
But i got another error :
-------------- Clean: Debug in wx2810-test01 ---------------
Cleaned "wx2810-test01 - Debug"
-------------- Build: Debug in wx2810-test01 ---------------
Compiling: resource.rc
Compiling: wx2810_test01App.cpp
Compiling: wx2810_test01Main.cpp
Compiling: GUIDialog.cpp
Linking executable: bin\Debug\wx2810-test01.exe
obj\Debug\wx2810_test01App.o:wx2810_test01App.cpp:(.rdata$_ZTV16wx2810_test01App[vtable for wx2810_test01App]+0x44): undefined reference to `wxApp::Initialize(int&, char**)'
obj\Debug\wx2810_test01App.o:wx2810_test01App.cpp:(.rdata$_ZTV16wx2810_test01App[vtable for wx2810_test01App]+0x90): undefined reference to `wxAppConsole::OnAssertFailure(char const*, int, char const*, char const*, char const*)'
obj\Debug\wx2810_test01App.o:wx2810_test01App.cpp:(.rdata$_ZTV16wx2810_test01App[vtable for wx2810_test01App]+0x94): undefined reference to `wxAppConsole::OnAssert(char const*, int, char const*, char const*)'
obj\Debug\wx2810_test01Main.o:C:/wxWidgets-2.8.10/include/wx/string.h:287: undefined reference to `wxStringBase::ConcatSelf(unsigned int, char const*, unsigned int)'
obj\Debug\wx2810_test01Main.o: In function `wxStringBase':
C:/wxWidgets-2.8.10/include/wx/string.h:352: undefined reference to `wxOnAssert(char const*, int, char const*, char const*, char const*)'
C:/wxWidgets-2.8.10/include/wx/string.h:368: undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 30 seconds)
6 errors, 0 warnings
If you say set wx global env . I try this setings when i use wizard.
This is my set .
(http://shareimage.ro/images/ne8febd6o1nm0shp8g1.jpg) (http://shareimage.ro/)
What is wrong ?
@MortenMacFly : You will see more env vars ( i use it in default compiler, like SDL , HGE ...) pass by this .
-------------- Clean: Debug in wx2810-test01 ---------------
Cleaned "wx2810-test01 - Debug"
-------------- Build: Debug in wx2810-test01 ---------------
windres.exe -i D:\cata\wx2810-test01\resource.rc -J rc -o obj\Debug\resource.res -O coff -IC:\wxWidgets-2.8.10\include -ID:\cata\hge181
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Wno-attributes -Wall -g -D__WXDEBUG__ -march=athlon-fx -march=athlon64 -march=athlon-mp -march=athlon-xp -march=i486 -IC:\wxWidgets-2.8.10\include -IC:\wxWidgets-2.8.10\contrib\include -IC:\wxWidgets-2.8.10\include -I"C:\Program Files\CodeBlocks\MinGW\include\SDL" -IC:\boost_1_42_0\boost -ID:\cata\hge181\include -c D:\cata\wx2810-test01\wx2810_test01App.cpp -o obj\Debug\wx2810_test01App.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Wno-attributes -Wall -g -D__WXDEBUG__ -march=athlon-fx -march=athlon64 -march=athlon-mp -march=athlon-xp -march=i486 -IC:\wxWidgets-2.8.10\include -IC:\wxWidgets-2.8.10\contrib\include -IC:\wxWidgets-2.8.10\include -I"C:\Program Files\CodeBlocks\MinGW\include\SDL" -IC:\boost_1_42_0\boost -ID:\cata\hge181\include -c D:\cata\wx2810-test01\wx2810_test01Main.cpp -o obj\Debug\wx2810_test01Main.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Wno-attributes -Wall -g -D__WXDEBUG__ -march=athlon-fx -march=athlon64 -march=athlon-mp -march=athlon-xp -march=i486 -IC:\wxWidgets-2.8.10\include -IC:\wxWidgets-2.8.10\contrib\include -IC:\wxWidgets-2.8.10\include -I"C:\Program Files\CodeBlocks\MinGW\include\SDL" -IC:\boost_1_42_0\boost -ID:\cata\hge181\include -c D:\cata\wx2810-test01\GUIDialog.cpp -o obj\Debug\GUIDialog.o
mingw32-g++.exe -LC:\wxWidgets-2.8.10\lib -LC:\SDL-1.2.13\lib -L"C:\Program Files\CodeBlocks\MinGW\lib" -LC:\boost_1_42_0\boost -LD:\cata\hge181\lib -o bin\Debug\wx2810-test01.exe obj\Debug\wx2810_test01App.o obj\Debug\wx2810_test01Main.o obj\Debug\GUIDialog.o obj\Debug\resource.res -Wl,--enable-auto-import -mthreads -lmingw32 C:\wxWidgets-2.8.10\lib\gcc_dll\libwxexpat.a C:\wxWidgets-2.8.10\lib\gcc_dll\libwxexpat.a C:\wxWidgets-2.8.10\lib\gcc_dll\libwxjpeg.a C:\wxWidgets-2.8.10\lib\gcc_dll\libwxmsw28u.a C:\wxWidgets-2.8.10\lib\gcc_dll\libwxpng.a C:\wxWidgets-2.8.10\lib\gcc_dll\libwxregexu.a C:\wxWidgets-2.8.10\lib\gcc_dll\libwxtiff.a C:\wxWidgets-2.8.10\lib\gcc_dll\libwxzlib.a -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 D:\cata\hge181\lib\gcc\libhge.a D:\cata\hge181\lib\gcc\libhgehelp.a -mwindows
obj\Debug\wx2810_test01App.o:wx2810_test01App.cpp:(.rdata$_ZTV16wx2810_test01App[vtable for wx2810_test01App]+0x44): undefined reference to `wxApp::Initialize(int&, char**)'
obj\Debug\wx2810_test01App.o:wx2810_test01App.cpp:(.rdata$_ZTV16wx2810_test01App[vtable for wx2810_test01App]+0x90): undefined reference to `wxAppConsole::OnAssertFailure(char const*, int, char const*, char const*, char const*)'
obj\Debug\wx2810_test01App.o:wx2810_test01App.cpp:(.rdata$_ZTV16wx2810_test01App[vtable for wx2810_test01App]+0x94): undefined reference to `wxAppConsole::OnAssert(char const*, int, char const*, char const*)'
obj\Debug\wx2810_test01Main.o:C:/wxWidgets-2.8.10/include/wx/string.h:287: undefined reference to `wxStringBase::ConcatSelf(unsigned int, char const*, unsigned int)'
obj\Debug\wx2810_test01Main.o: In function `wxStringBase':
C:/wxWidgets-2.8.10/include/wx/string.h:352: undefined reference to `wxOnAssert(char const*, int, char const*, char const*, char const*)'
C:/wxWidgets-2.8.10/include/wx/string.h:368: undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 39 seconds)
6 errors, 0 warnings
@oBFusCATed ...but your application is build in ansi mode
I build the wxWidgets with :
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1
The app use wizard template code : with monolitic , dialog (not frame) .
I don't add additional code.
I use C::B is with mingw32 , under XP .
Now , I got this error : "cannot find -lwxmsw28_richtext".
-------------- Clean: Debug in wx003 ---------------
Cleaned "wx003 - Debug"
-------------- Build: Debug in wx003 ---------------
windres.exe -i D:\cata\wx003\resource.rc -J rc -o obj\Debug\resource.res -O coff -IC:\wxWidgets-2.8.10\include -IC:\wxWidgets-2.8.10\lib\gcc_dll\msw -ID:\cata\hge181
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -Wno-attributes -Wall -g -march=athlon-fx -march=athlon64 -march=athlon-mp -march=athlon-xp -march=i486 -IC:\wxWidgets-2.8.10\include -IC:\wxWidgets-2.8.10\contrib\include -IC:\wxWidgets-2.8.10\lib\gcc_dll\msw -I"C:\Program Files\CodeBlocks\MinGW\include\SDL" -IC:\boost_1_42_0\boost -ID:\cata\hge181\include -c D:\cata\wx003\wx003App.cpp -o obj\Debug\wx003App.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -Wno-attributes -Wall -g -march=athlon-fx -march=athlon64 -march=athlon-mp -march=athlon-xp -march=i486 -IC:\wxWidgets-2.8.10\include -IC:\wxWidgets-2.8.10\contrib\include -IC:\wxWidgets-2.8.10\lib\gcc_dll\msw -I"C:\Program Files\CodeBlocks\MinGW\include\SDL" -IC:\boost_1_42_0\boost -ID:\cata\hge181\include -c D:\cata\wx003\wx003Main.cpp -o obj\Debug\wx003Main.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -Wno-attributes -Wall -g -march=athlon-fx -march=athlon64 -march=athlon-mp -march=athlon-xp -march=i486 -IC:\wxWidgets-2.8.10\include -IC:\wxWidgets-2.8.10\contrib\include -IC:\wxWidgets-2.8.10\lib\gcc_dll\msw -I"C:\Program Files\CodeBlocks\MinGW\include\SDL" -IC:\boost_1_42_0\boost -ID:\cata\hge181\include -c D:\cata\wx003\GUIDialog.cpp -o obj\Debug\GUIDialog.o
mingw32-g++.exe -LC:\wxWidgets-2.8.10\lib\gcc_dll -LC:\SDL-1.2.13\lib -L"C:\Program Files\CodeBlocks\MinGW\lib" -LC:\boost_1_42_0\boost -LD:\cata\hge181\lib -o bin\Debug\wx003.exe obj\Debug\wx003App.o obj\Debug\wx003Main.o obj\Debug\GUIDialog.o obj\Debug\resource.res -mthreads -lwxmsw28_richtext -lwxbase28_xml -lwxmsw28_adv -lwxmsw28_html -lwxmsw28_core -lwxbase28 -lwxpng -lwxzlib D:\cata\hge181\lib\gcc\libhge.a D:\cata\hge181\lib\gcc\libhgehelp.a -mwindows
c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw28_richtext
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 31 seconds)
1 errors, 0 warnings
I search on my computer with not results.
Another strange thing is on my resource.rc
aaaa ICON "wx/msw/std.ico"
#include "wx/msw/wx.rc"
What is aaaa ?