Author Topic: Problems with compiling Code::Blocks with wxWidgets 2.6.1  (Read 6854 times)

Offline skaut

  • Single posting newcomer
  • *
  • Posts: 3
Problems with compiling Code::Blocks with wxWidgets 2.6.1
« on: August 20, 2005, 10:28:05 pm »
Hi all,

I have some problems with building Code::Blocks from sources (sources are from cvs)
wxWidgets are in version 2.6.1, build like described on wiki pages.
When I try to compile Code::Blocks usin Code::Blocks everything goes fine, but last step fails.
I can not link codeblocks.exe file - it makes lot of error - undefined reference.
Attached is file with buid messages.
Can somebody help me to solve this problem ?

Best Regards
skaut


[attachment deleted by admin]

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Problems with compiling Code::Blocks with wxWidgets 2.6.1
« Reply #1 on: August 21, 2005, 08:20:02 am »
Apparently the makefile for wx261 is broken

try using the makefile.unix but edit the wxwidgets 2.4.2 references and change them to 2.6.1's.

Offline skaut

  • Single posting newcomer
  • *
  • Posts: 3
Re: Problems with compiling Code::Blocks with wxWidgets 2.6.1
« Reply #2 on: August 21, 2005, 10:17:45 am »
Hi,

Thanks for answer.

I am not using makefile, I am compiling with Code::Blocks itself, using "CodeBlocks-wx2.6.0.cbp" project file.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Problems with compiling Code::Blocks with wxWidgets 2.6.1
« Reply #3 on: August 21, 2005, 12:29:25 pm »
Hi skaut,
have you done some changes in your "CodeBlocks-wx2.6.0.cbp" project file ?
if i compare it with my output, you have some unnecessary library path includes, like
Code
-LC:\MinGW\wxWidgets-2.6.1\lib\gcc_dll\msw 

and
Code
-LC:\CodeBlocks\lib 


you only should need this
Code
-LC:\MinGW\wxWidgets-2.6.1\lib\gcc_dll  

but it should not harm.

but
in my project file CodeBlocks.exe links as GUI executable with linker option "-mwindows" which is missing in your project definition !

your output
Code
Project   : Code::Blocks (wx2.6)
Compiler  : GNU GCC Compiler (called directly)
Directory : D:\Progs\CodeBlocks\src\
--------------------------------------------------------------------------------
...
Switching to target: src
...
mingw32-g++.exe 
-Ldevel -Lsrc\wxDockit\lib  -Lsdk\tinyxml -LC:\MinGW\wxWidgets-2.6.1\lib\gcc_dll\msw
-LC:\MinGW\wxWidgets-2.6.1\lib\gcc_dll  -LC:\CodeBlocks\lib
-o devel\codeblocks.exe 
-lcodeblocks -lwxDockIt -lwxmsw26_stc -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32  -lwxmsw26 
.objs\2.6\src\app.o .objs\2.6\src\dlgabout.o .objs\2.6\src\dlgaboutplugin.o .objs\2.6\src\environmentsettingsdlg.o .objs\2.6\src\impexpconfig.o .objs\2.6\src\main.o .objs\2.6\src\printdlg.o .objs\2.6\src\startherepage.o   
.objs\2.6\src\app.o: In function `ZN11wxVideoModeC1Eiiii':
C:/MinGW/wxWidgets-2.6.1/include/wx/app.h:(.text+0x45): undefined reference to `_imp___ZN12wxAppConsole17CheckBuildOptionsEPKcS1_'
.objs\2.6\src\app.o: In function `WinMain':
D:/Progs/CodeBlocks/src/src/app.cpp:2

my output
Code
Project   : .my.CodeBlocks, 1.0-cvs HEAD, wx261
Compiler  : GNU GCC Compiler (called directly)
Directory : D:\cpp\_projects\Codeblocks\_HEAD\src\
--------------------------------------------------------------------------------
Switching to target: src
...
mingw32-g++.exe 
-Ldevel -Lsrc\wxDockit\lib  -Lsdk\tinyxml -LD:\wx261\lib\gcc_dll 
-o devel\codeblocks.exe
.objs\2.6\src\app.o .objs\2.6\src\dlgabout.o .objs\2.6\src\dlgaboutplugin.o .objs\2.6\src\environmentsettingsdlg.o .objs\2.6\src\impexpconfig.o .objs\2.6\src\main.o .objs\2.6\src\printdlg.o .objs\2.6\src\startherepage.o  .objs\2.6\src\resources\resources.res     
-lcodeblocks -lwxDockIt -lwxmsw26_stc -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32  -lwxmsw26  -mwindows
Process terminated with status 0 (0 minutes, 54 seconds)
0 errors, 0 warnings

you can compare your settings with my project file

[attachment deleted by admin]
« Last Edit: August 21, 2005, 12:34:52 pm by tiwag »

Offline skaut

  • Single posting newcomer
  • *
  • Posts: 3
Re: Problems with compiling Code::Blocks with wxWidgets 2.6.1
« Reply #4 on: August 21, 2005, 06:16:15 pm »
Hi tiwag,

thanks for Your hint.
My project file is the same, but I had different settings in compiler options - for some reasone there wasn't option -mwindows for GUI application.
I modify this and now it is working.
I fix also makefile.wx2.6 to compile it correctly.
Line 765 from makefile:
$(src_BIN): $(src_LINKOBJS) $(src_RESOURCE) ..\wxDockit\lib\libwxdockit.a
this cause a problem - "no rules to make target "..\wxDockit\lib\libwxdockit.a""
after change:
$(src_BIN): $(src_LINKOBJS) $(src_RESOURCE) src/wxDockit/lib/libwxDockIt.a
it compiles without any errors

Best Regards
skaut



Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Problems with compiling Code::Blocks with wxWidgets 2.6.1
« Reply #5 on: August 21, 2005, 07:07:55 pm »
Hi tiwag,
thanks for Your hint.
...
skaut
you're welcome, glad that it worked  :D