I discussed this over here already, but came to no solution: other thread (http://forums.codeblocks.org/index.php/topic,5937.msg45521/boardseen.html)
I use the newest nightly CB and GCC4.2 under WinXP. Building a wxW program with Dialogblocks works just fine, but when I try to use CB then I get a huge amount of errors. I included a lot of directories in the Compiler Settings, but nothing seems to help.
mingw32-gcc-4.2.0.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -O2
-march=athlon-xp -O3 -W -pg -g UNICODE=1 -IH:\wxWidgets-2.8.4\include -IH:\wxWidgets-2.8.4\contrib\include
-IH:\wxWidgets-2.8.4\lib\gcc_lib\msw -Ih:\MinGW\include -IH:\wxWidgets-2.8.4\include -IH:\wxWidgets-2.8.4\include\wx\msw
-IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\lib\gcc_lib\mswu -IH:\wxWidgets-2.8.4\lib\gcc_lib\mswud
-IH:\wxWidgets-2.8.4\include\wx -IH:\wxWidgets-2.8.4\lib\gcc_lib\mswu\wx -IH:\wxWidgets-2.8.4\lib\gcc_lib\mswud\wx -c
H:\myProjects2\wixTest\wx_pch.h -o wx_pch.h.gch\Release_wx_pch_h_gch
In file included from H:/wxWidgets-2.8.4/include/wx/wxprec.h:46,
from ./wx_pch.h:14,
from :0:
H:/wxWidgets-2.8.4/include/wx/msw/wrapcctl.h: In function 'wxSetCCUnicodeFormat':
H:/wxWidgets-2.8.4/include/wx/msw/wrapcctl.h:48: error: expected expression before ':' token
H:/wxWidgets-2.8.4/include/wx/msw/wrapcctl.h:45: warning: unused parameter 'hwnd'
H:/wxWidgets-2.8.4/include/wx/msw/wrapcctl.h: At top level:
H:/wxWidgets-2.8.4/include/wx/msw/wrapcctl.h:58: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wxFont'
H:/wxWidgets-2.8.4/include/wx/msw/wrapcctl.h:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wxGetCCDefaultFont'
...
and so on...
Anyone have a good idea?
okay Tim, I made all the changes (except for the dll path) like u suggested and still get the exact same errors. And yes I've compiled wxW in Debug too. I find it strange though that I should be adding the wxW directories manually each time I make a new project. They should be stored globally, like in MSVC. But right now, no wxW path is under the global compiler settings only in the projects Search-Directories.
-------------- Build: Release in wixTest ---------------
mingw32-gcc-4.2.0.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -O2
-march=athlon-xp -O3 -W -pg -g -D_UNICODE -IH:\wxWidgets-2.8.4\include -IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\include
-IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\lib\gcc_lib\mswu -Ih:\MinGW\include -c H:\myProjects2\wixTest\wx_pch.h -o
wx_pch.h.gch\Release_wx_pch_h_gch
In file included from H:/wxWidgets-2.8.4/include/wx/wxprec.h:46,
from ./wx_pch.h:14,
from :0:
H:/wxWidgets-2.8.4/include/wx/msw/wrapcctl.h: In function 'wxSetCCUnicodeFormat':
H:/wxWidgets-2.8.4/include/wx/msw/wrapcctl.h:48: error: expected expression before ':' token
H:/wxWidgets-2.8.4/include/wx/msw/wrapcctl.h:45: warning: unused parameter 'hwnd'
H:/wxWidgets-2.8.4/include/wx/msw/wrapcctl.h: At top level:
H:/wxWidgets-2.8.4/include/wx/msw/wrapcctl.h:58: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wxFont'
H:/wxWidgets-2.8.4/include/wx/msw/wrapcctl.h:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wxGetCCDefaultFont'
In file included from H:/wxWidgets-2.8.4/include/wx/string.h:55,
from H:/wxWidgets-2.8.4/include/wx/log.h:47,
from H:/wxWidgets-2.8.4/include/wx/msw/private.h:24,
from H:/wxWidgets-2.8.4/include/wx/msw/wrapcdlg.h:18,
from H:/wxWidgets-2.8.4/include/wx/wxprec.h:47,
from ./wx_pch.h:14,
from :0:
H:/wxWidgets-2.8.4/include/wx/buffer.h:127: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wxCharBuffer'
H:/wxWidgets-2.8.4/include/wx/buffer.h:129: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wxWritableCharBuffer'
ok here it is:
/***************************************************************
* Name: wx_pch.h
* Purpose: Header to create Pre-Compiled Header (PCH)
* Author: Pat Le Cat (patlecat@gmx.net)
* Created: 2007-05-20
* Copyright: Pat Le Cat (winterthur.grunliberale.ch)
* License:
**************************************************************/
#ifndef WX_PCH_H_INCLUDED
#define WX_PCH_H_INCLUDED
// basic wxWidgets headers
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#ifdef WX_PRECOMP
// put here all your rarely-changing header files
#endif // WX_PRECOMP
#endif // WX_PCH_H_INCLUDED
Please check compiler settings.
Under Tool Chain Executables
Program files Tab.
I have
C-Compiler mingw32-gcc.exe
C++ Compiler mingw32-g++.exe
Resource Compiler windres.exe
Note, I omitted the other values since, I think they are not related to compiler errors.
Please verify the value for C++ Compiler.
You are using mingw32-gcc-4.2.0.exe (in your command posted above) which errors out, I changed it to "mingw32-g++.exe" which does not at the same place.
Please post an updated "Build Log" for me to check after you verify the "Program files" Tab.
I just need the command plus 6 to 12 lines of errors.
Tim S
I have changed so many settings in the last weeks, also the gcc executables. But this time the settings mix gives some progress, thanks man :P
Now this link error (which I had also in the beginning) remains:
-------------- Build: Release in wixTest ---------------
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -O2 -march=athlon-xp
-O3 -W -pg -g -D_UNICODE -IH:\wxWidgets-2.8.4\include -IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\include
-IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\lib\gcc_lib\mswu -Ih:\MinGW\include -c H:\myProjects2\wixTest\wx_pch.h -o
wx_pch.h.gch\Release_wx_pch_h_gch
In file included from H:/wxWidgets-2.8.4/include/wx/gdicmn.h:23,
from H:/wxWidgets-2.8.4/include/wx/msw/private.h:213,
from H:/wxWidgets-2.8.4/include/wx/msw/wrapcdlg.h:18,
from H:/wxWidgets-2.8.4/include/wx/wxprec.h:47,
from ./wx_pch.h:14,
...
windres.exe -i H:\MYPROJ~1\wixTest\resource.rc -J rc -o obj\Release\resource.res -O coff -IH:\wxWidgets-2.8.4\include -IH:\wxWidgets-2.8.4\include -Ih:\MinGW\include
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -O2 -march=athlon-xp -O3 -W -pg -g -D_UNICODE -IH:\wxWidgets-2.8.4\include -IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\include -IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\lib\gcc_lib\mswu -Ih:\MinGW\include -c H:\myProjects2\wixTest\GUIDialog.cpp -o obj\Release\GUIDialog.o
mingw32-g++.exe -LH:\wxWidgets-2.8.4\lib\gcc_lib -Lh:\MinGW\lib -o bin\Release\wixTest.exe obj\Release\wixTestApp.o obj\Release\wixTestMain.o
obj\Release\GUIDialog.o obj\Release\resource.res -s -s -pg -lgmon -lwxmsw28 -lwxpng -lwxjpeg -lwxtiff -lwxzlib -lkernel32 -luser32 -lgdi32
-lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -mwindows
h:/mingw/bin/../lib/gcc/mingw32/4.2.0/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw28
collect2: ld returned 1 exit status
ok now the release build runs fine.
but now i can't debug. it builds but i wanted to see if i can step through the program. and now it gives me this error:
Mismatch between the program and library build version detected.
And there it says that I use the debug version of the wxW-Lib but my program is not compiled as debug...?
-------------- Build: Debug in wixTest ---------------
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -Wall -g
-march=athlon-xp -O3 -W -pg -g -D_UNICODE -IH:\wxWidgets-2.8.4\include -IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\include
-IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\lib\gcc_lib\mswud -Ih:\MinGW\include -c H:\myProjects2\wixTest\wx_pch.h -o
wx_pch.h.gch\Debug_wx_pch_h_gch
cc1plus.exe: warning: H:\myProjects2\wixTest\wx_pch.h.gch/Release_wx_pch_h_gch: created and used with differing settings of '-m3dnow'
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -Wall -g
-march=athlon-xp -O3 -W -pg -g -D_UNICODE -IH:\wxWidgets-2.8.4\include -IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\include
-IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\lib\gcc_lib\mswud -Ih:\MinGW\include -c H:\myProjects2\wixTest\wixTestApp.cpp -o
obj\Debug\wixTestApp.o
cc1plus.exe: warning: ./wx_pch.h.gch/Debug_wx_pch_h_gch: not used because `GCP_USEKERNING' not defined
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -Wall -g
-march=athlon-xp -O3 -W -pg -g -D_UNICODE -IH:\wxWidgets-2.8.4\include -IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\include
-IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\lib\gcc_lib\mswud -Ih:\MinGW\include -c H:\myProjects2\wixTest\wixTestMain.cpp -o
obj\Debug\wixTestMain.o
cc1plus.exe: warning: ./wx_pch.h.gch/Debug_wx_pch_h_gch: not used because `GCP_USEKERNING' not defined
H:\myProjects2\wixTest\wixTestMain.cpp:59: warning: unused parameter 'event'
H:\myProjects2\wixTest\wixTestMain.cpp:64: warning: unused parameter 'event'
H:\myProjects2\wixTest\wixTestMain.cpp:69: warning: unused parameter 'event'
windres.exe -i H:\MYPROJ~1\wixTest\resource.rc -J rc -o obj\Debug\resource.res -O coff -IH:\wxWidgets-2.8.4\include -IH:\wxWidgets-2.8.4\include -Ih:\MinGW\include
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -Wall -g
-march=athlon-xp -O3 -W -pg -g -D_UNICODE -IH:\wxWidgets-2.8.4\include -IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\include
-IH:\wxWidgets-2.8.4\contrib\include -IH:\wxWidgets-2.8.4\lib\gcc_lib\mswud -Ih:\MinGW\include -c H:\myProjects2\wixTest\GUIDialog.cpp -o
obj\Debug\GUIDialog.o
cc1plus.exe: warning: ./wx_pch.h.gch/Debug_wx_pch_h_gch: not used because `GCP_USEKERNING' not defined
mingw32-g++.exe -LH:\wxWidgets-2.8.4\lib\gcc_lib -Lh:\MinGW\lib -o bin\Debug\wixTest.exe obj\Debug\wixTestApp.o obj\Debug\wixTestMain.o
obj\Debug\GUIDialog.o obj\Debug\resource.res -s -pg -lgmon -lwxmsw28ud_core -lwxbase28ud -lwxpngd -lwxjpegd -lwxtiffd -lwxzlibd -lkernel32
-luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -mwindows