Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: ironhead on November 24, 2007, 01:31:35 am

Title: Compiling wxWidget 2.8.6 for Code::Blocks
Post by: ironhead on November 24, 2007, 01:31:35 am
Hey All,

This is somewhat off topic, but I'm having a hard time getting wxWiget 2.8.6 to compile.  During the compile I get:

Code
windres --use-temp-file -i../../src/msw/version.rc -ogcc_mswudll\monodll_version_rc.o    --define __
WXMSW__      --define _UNICODE   --include-dir ..\..\lib\gcc_dll\mswu --include-dir ..\../include --
define WXDLLNAME=wxmsw28u_gcc_custom --include-dir ..\../src/tiff --include-dir ..\../src/jpeg --inc
lude-dir ..\../src/png --include-dir ..\../src/zlib  --include-dir ..\../src/regex --include-dir ..\
../src/expat/lib --define wxUSE_BASE=1 --define WXMAKINGDLL
../../src/msw/version.rc:12:24: wx/version.h: No such file or directory
windres: gcc exited with status 1
mingw32-make: *** [gcc_mswudll\monodll_version_rc.o] Error 1

what I don't understand is that wx/version.h is in the '..\../include' directory which is included with above as part of a '--include-dir'.  I didn't have this problem with 2.8.4.  I'm compiling using MinGW on a XP Pro box.

Has anyone else had this problem?  If so, is there a way around it?

Cheers!

Chris
Title: Re: Compiling wxWidget 2.8.6 for Code::Blocks
Post by: TDragon on November 24, 2007, 01:36:01 am
This is a bug in the latest MinGW release of binutils; downgrade to binutils-2.17.50-20060824-1.
Title: Re: Compiling wxWidget 2.8.6 for Code::Blocks
Post by: ironhead on November 24, 2007, 01:48:07 am
That's got it, thanx!
Title: Re: Compiling wxWidget 2.8.6 for Code::Blocks
Post by: ironhead on November 24, 2007, 01:48:14 pm
I've got wxWidgets 2.8.6 to compile and I am now attempting to compile Code::Blocks.  I've hit another snag tough.  I now get the following error:

Code
C:\Source\wxWidgets-2.8.6\include\wx\fs_mem.h|68|undefined reference to `_imp___ZTV17wxMemoryFSHandler'|

Which is odd because the line it's complaining about is defining the wxMemoryFSHandler class.

EDIT:  I really should take a closer look before posting, this is a linker error while building codeblocks.exe.  I've reverted to using the 3.4.5 version of gcc/g++ when compiling as opposed to version 4.2.1, is there something that needs to be tweaked to compile with 4.2.1?

Chris
Title: Re: Compiling wxWidget 2.8.6 for Code::Blocks
Post by: ironhead on November 24, 2007, 08:40:26 pm
I saw a same error in another thread in the forum and it mentioned that the wxWidgets lib compiled with 3.4.5 wouldn't work with 4.2.1, which makes sense.  I had thought I had taken care of it with:

Code
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 CC=gcc-dw2

but I had for got to take care the g++ compiler, hence the error.  I modified my wxWidgets make command to:

Code
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 CC=gcc-dw2 CXX=g++-dw2

and everything is fine now.

Cheers!

Chris