User forums > Help

Compiling Codeblocks

<< < (3/5) > >>

mandrav:
Now that you posted the full compile log, I noticed that you 're not using MinGW distribution but an existing dev-cpp dir. There is nothing wrong with it except that you must add the include dirs you posted above...
Hopefully your build will succeed now :)

Yiannis.

hd:
Hi,

(This topic seems ok for my unexpected problem)
(Using CVS, wx242, gcc 3.4.2 (mingw))

Since yesterday I can't compile CodeBlocks. Compiler log is as follows:

Linking dynamic library: devel\codeblocks.dll
Creating library file: devel\\libcodeblocks.a
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x9ff): undefined reference to `_imp___ZN12wxFileSystem10m_HandlersE'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0xd5f): undefined reference to `_imp___ZN12wxFileSystem10m_HandlersE'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x1682): undefined reference to `_imp___Z8wxIsWildRK8wxString'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x1707): undefined reference to `_imp___ZN12wxFileSystem10m_HandlersE'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x173b): undefined reference to `_imp___ZN12wxFileSystem9FindFirstERK8wxStringi'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x2183): undefined reference to `_imp___ZN12wxFileSystem13FileNameToURLERK10wxFileName'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x2431): undefined reference to `_imp___ZN12wxFileSystem13FileNameToURLERK10wxFileName'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x2556): undefined reference to `_imp___ZN12wxFileSystem8FindNextEv'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x297f): undefined reference to `_imp___ZN10wxDateTime3SetERK2tm'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x2cff): undefined reference to `_imp___ZN12wxFileSystem10m_HandlersE'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x302f): undefined reference to `_imp___ZN12wxFileSystem10m_HandlersE'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x331b): undefined reference to `_imp___ZN12wxWindowBase10FindWindowERK8wxString'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x3428): undefined reference to `_imp___Z10wxLogErrorPKcz'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x3aee): undefined reference to `_imp___ZN12wxFileSystem10m_HandlersE'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x3bcb): undefined reference to `_imp___ZN12wxFileSystem8OpenFileERK8wxString'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x3d38): undefined reference to `_imp___Z10wxLogErrorPKcz'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x4087): undefined reference to `_imp___ZN12wxFileSystem8OpenFileERK8wxString'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x41d3): undefined reference to `_imp___ZN8wxLocale21GetSystemEncodingNameEv'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x42e0): undefined reference to `_imp___Z10wxLogErrorPKcz'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x43f2): undefined reference to `_imp___Z10wxLogErrorPKcz'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x461a): undefined reference to `_imp___Z10wxLogErrorPKcz'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x4805): undefined reference to `_imp___Z10wxLogErrorPKcz'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x48b4): undefined reference to `_imp___ZN12wxFileSystem12ChangePathToERK8wxStringb'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x670f): undefined reference to `_imp___ZN14wxBaseArrayIntC2Ev'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x684f): undefined reference to `_imp___ZN14wxBaseArrayIntC2Ev'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x6c8d): undefined reference to `_imp___ZN8wxWindow16sm_classwxWindowE'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x6d1a): undefined reference to `_imp___ZN8wxWindow16sm_classwxWindowE'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x73ca): undefined reference to `_imp___Z10wxLogErrorPKcz'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x76cb): undefined reference to `_imp___Z10wxLogErrorPKcz'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x7df5): undefined reference to `_imp___Z10wxLogErrorPKcz'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x7fec): undefined reference to `_imp___ZTV10wxGDIImage'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x7ff6): undefined reference to `_imp___ZTV6wxIcon'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x806d): undefined reference to `wxIcon::~wxIcon()'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x81ab): undefined reference to `_imp___ZTV10wxGDIImage'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x8de6): undefined reference to `_imp___ZN14wxBaseArrayInt3AddEij'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x9ab0): undefined reference to `_imp___ZN12wxFileSystem8OpenFileERK8wxString'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x9ae8): undefined reference to `_imp___ZN7wxImageC1ER13wxInputStreamli'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x9b1f): undefined reference to `_imp___ZNK7wxImage2OkEv'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x9b7b): undefined reference to `_imp___ZNK7wxImage5ScaleEii'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x9bfc): undefined reference to `_imp___ZTV10wxGDIImage'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x9c19): undefined reference to `_imp___ZN8wxBitmap15CreateFromImageERK7wxImagei'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0x9dd5): undefined reference to `_imp___ZTV10wxGDIImage'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0xa020): undefined reference to `_imp___ZN13wxArtProvider9GetBitmapERK8wxStringS2_RK6wxSize'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0xa090): undefined reference to `_imp___ZTV10wxGDIImage'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0xa292): undefined reference to `_imp___Z10wxLogErrorPKcz'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0xa2c4): undefined reference to `_imp___ZTV10wxGDIImage'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0xa39a): undefined reference to `_imp___Z10wxLogErrorPKcz'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0xa3cc): undefined reference to `_imp___ZTV10wxGDIImage'
..\\..\\..\\..\\wx\\lib/libwxxrc.a(xmlres.o):xmlres.cpp:(.text+0xa4f7): undefined reference to `_imp___ZTV10wxGDIImage'
Process terminated with status 1 (3 minutes, 51 seconds)
0 errors, 0 warnings


To double check my wx (which I didn't touch it for a while) I compiled xrc demo:

C:\wx\contrib\samples\xrc>mingw32-make -fmakefile.g95 FINAL=1 WXUSINGDLL=1 UNICO
DE=0
g++ -c  -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -I../../../lib/mswdll -I../..
/../include -I../../../contrib/include -I../../../src/regex -I../../../src/png -
I../../../src/jpeg -I../../../src/zlib -I../../../src/tiff -I../../../contrib/in
clude         -DSTRICT -DHAVE_W32API_H -D__WXMSW__ -D__WINDOWS__  -Wall -O2 -DWX
USINGDLL=1  -o xrcdemo.o xrcdemo.cpp
g++ -c  -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -I../../../lib/mswdll -I../..
/../include -I../../../contrib/include -I../../../src/regex -I../../../src/png -
I../../../src/jpeg -I../../../src/zlib -I../../../src/tiff -I../../../contrib/in
clude         -DSTRICT -DHAVE_W32API_H -D__WXMSW__ -D__WINDOWS__  -Wall -O2 -DWX
USINGDLL=1  -o myframe.o myframe.cpp
g++ -c  -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -I../../../lib/mswdll -I../..
/../include -I../../../contrib/include -I../../../src/regex -I../../../src/png -
I../../../src/jpeg -I../../../src/zlib -I../../../src/tiff -I../../../contrib/in
clude         -DSTRICT -DHAVE_W32API_H -D__WXMSW__ -D__WINDOWS__  -Wall -O2 -DWX
USINGDLL=1  -o derivdlg.o derivdlg.cpp
g++ -c  -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -I../../../lib/mswdll -I../..
/../include -I../../../contrib/include -I../../../src/regex -I../../../src/png -
I../../../src/jpeg -I../../../src/zlib -I../../../src/tiff -I../../../contrib/in
clude         -DSTRICT -DHAVE_W32API_H -D__WXMSW__ -D__WINDOWS__  -Wall -O2 -DWX
USINGDLL=1  -o custclas.o custclas.cpp
windres --use-temp-file -i xrcdemo.rc -o xrcdemo_resources.o  --include-dir ../.
./../include  --define __WIN32__ --define __WIN95__ --define __GNUWIN32__
g++  -Wl,--subsystem,windows -mwindows -L../../../lib -L../../../contrib/lib   -
o xrcdemo.exe xrcdemo.o myframe.o derivdlg.o custclas.o xrcdemo_resources.o -lwx
xrc ../../../lib/libwxmsw242.a -lstdc++ -lgcc -lodbc32 -lwsock32 -lwinspool -lwi
nmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lodbc32 -lwsock32 -lopen
gl32 -lglu32 -lole32 -loleaut32 -luuid

What can I do ?

--
Regards,
Hakki Dogusan

mandrav:
Hi,

it's a minor bug introduced a couple of days ago. It's fixed already in CVS but you can't have a CVS-compiled exe! Deadlock!
Anyway.
One option is to use the Makefile. It 'll work.
The problem is the order of linking libraries. If you want to fix this yourself, add "-lwxmsw$(WX_VER)" as the last library in "sdk" libs . Normally it takes this lib from the project-wide libs, but the bug was that it didn't respect the linking order.

HTH,
Yiannis.

Anonymous:
I Can't compile wxWidgets stc :(

Because i had lots of weird errors with my MINGW installation I decided to reinstall MINGW. I have GCC 3.2.3, and wxwidgets compiles file. xrc compiles fine.

However, when trying to compile stc, this is what i get:

(I'm using MSYS)

$ make -f makefile.g95 WXUSINGDLL=1 FINAL=1 UNICODE=0
g++ -c  -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -I../../../lib/mswdll -I../../../include -I../../../contrib/include -I../../../src/regex -I../../../src/png -I../../../src/jpeg -I../../../src/zlib -I../../../src/tiff -D__WX__ -DSCI_LEXER -DLINK_LEXERS -I../../../contrib/src/stc/scintilla/include -I../../../contrib/src/stc/scintilla/src -I. -I../../../contrib/include         -DSTRICT -DHAVE_W32API_H -D__WXMSW__ -D__WINDOWS__  -Wall -O2 -fno-rtti -fno-exceptions -DWXUSINGDLL=1  -o stc.o stc.cpp
I:/Temp/ccQRaaaa.s: Assembler messages:
I:/Temp/ccQRaaaa.s:307: Error: symbol `_D' is already defined
make: *** [stc.o] Error 1

Any help?

rickg22:
That was me. Anyway... I solved it. And I've FINALLY REALIZED what the heck was going on.

All my compiles had mixed versions of GCC. I never had used "make clean" (to get rid of object files, etc).

So I updated to Gcc/G++ 3.4.2, then used it to compile wxwidgets.
Oh. I also remembered to copy (WXDIR)\lib\mswdll\wx\setup.h to (WXDIR)\include\wx.

Then I packed the lib and include directory trees into one zip file, (and did the same with the contrib\lib and contrib\include), and forgot about it.

I compiled codeblocks... and IT WORKED!!! :D

Finally!! *whew*
I think I'm gonna zip my MINGW-with-wxWidgets directory and keep it that way.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version