Linking errors with sample project (CodeBlocks)

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
stu003
In need of some credit
In need of some credit
Posts: 4
Joined: Mon Oct 02, 2006 7:36 pm
Contact:

Linking errors with sample project (CodeBlocks)

Post by stu003 »

Hi,

I'm trying to build a sample project generated with CodeBlocks and getting error messages that methods of wxSystemOptions and wxClientDataContainer are not found.

I was trying to build wxWidgets with different options (debug/release, ANSI/UNICODE etc.) and using makefile.gcc or MSYS configure tool.

By the way, to get makefile.gcc work I had to replace manually all backward slashes (\) to forward (/) in the include (-I) compiler options.

Thanks!
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

What version of Code::Blocks are you using and what version of wxWidgets does it expect to compile against? It might be that it is compiled with a newer version of wxWidgets compared to what you have installed.

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
stu003
In need of some credit
In need of some credit
Posts: 4
Joined: Mon Oct 02, 2006 7:36 pm
Contact:

Post by stu003 »

Sorry, I forgot to tell this. The wxWidgets version is 2.6.3 (MSW), and I'm using CodeBlocks 1.0 RC2 (including gcc 3.4.4).

The IDE creates a sample wxWidgets project with cusom variables that store paths to the wxWidgets library (which I edited of course). Also I had to correct pieces like

Code: Select all

wxMenu* fileMenu = new wxMenu("");
to surround an empty string with wxT().
stu003
In need of some credit
In need of some credit
Posts: 4
Joined: Mon Oct 02, 2006 7:36 pm
Contact:

Post by stu003 »

Currently I solved the problem by using MONOLITHIC=1 building option. It looks like this is a problem of the gcc linker.
mispunt
Experienced Solver
Experienced Solver
Posts: 59
Joined: Tue Oct 19, 2004 3:23 pm
Location: Ede, Holland

Post by mispunt »

The template provided by Code::Blocks does only support the MONOLITHIC build, in the nightly build it should be possible to use the none monolithic build. (for the nightly builds see the forum of C::B)
OS: win XP pro
Compiler: MingW
wxWidgets version: 2.6.2
stu003
In need of some credit
In need of some credit
Posts: 4
Joined: Mon Oct 02, 2006 7:36 pm
Contact:

Post by stu003 »

mispunt wrote:The template provided by Code::Blocks does only support the MONOLITHIC build, in the nightly build it should be possible to use the none monolithic build. (for the nightly builds see the forum of C::B)
Sorry, can't quite understand what does this support mean. If it's just in the project settings for the libraries used by the linker then I manually added ones built with non-monolithic build (wx..._core etc.)
dsilvia
Earned some good credits
Earned some good credits
Posts: 145
Joined: Sun May 29, 2005 3:42 pm
Location: Bettendorf, Iowa, USA (aka, BFE)

Re: Linking errors with sample project (CodeBlocks)

Post by dsilvia »

stu003 wrote:Hi,

I'm trying to build a sample project generated with CodeBlocks and getting error messages that methods of wxSystemOptions and wxClientDataContainer are not found.

I was trying to build wxWidgets with different options (debug/release, ANSI/UNICODE etc.) and using makefile.gcc or MSYS configure tool.

By the way, to get makefile.gcc work I had to replace manually all backward slashes (\) to forward (/) in the include (-I) compiler options.

Thanks!
You know, all these problems with Code::Blocks mismatches of libs can be avoided. Use DialogBlocks instead. It always checks that the lib you are using and the lib you have said you want to use are a match. It builds the libs for every platform available to wxWidgets and will build any code on any platform for wxWidgets. No running to a forum to find the latest configurations that work or what "secrets" re: Code::Blocks/MinGW/MSYS/wxWidgets versions you need to know to get things to work today. That is, unless you enjoy solving mysteries!;)

Personally, I'd rather work with my applications than try to figure out what's wrong with my tools this time, today.

thx,
Dave S.

wxMS_developers
Post Reply