Linker & Code Blocks problems

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
Blue_Stream
In need of some credit
In need of some credit
Posts: 3
Joined: Mon Jul 18, 2011 9:46 am

Linker & Code Blocks problems

Post by Blue_Stream » Mon Jul 18, 2011 9:57 am

Hello All,

First, I would like to apologize for this beginner question, but I'm quite stuck on that, even with the installation tutorials.

My problem is simply as I'm not able to have the correct settings for the linker.

I would like if possible, have a dynamic linking of the libs.

I can create a simple projects, but when i start to use wxSocket for example, it's getting worse...

I have no problem using wxDev-cpp, I think some step are more automatic... I were using this software for a while, but as I will start something bigger I'd like to go on Code::Blocks.

I've try to compile wxWidgets and also using the Packs, but I always have different problem related to the linker.

Config:
Code Blocks 10.05
MinGW (latest)
wxWidgets 2.8 (pack & src)
Windows XP.

So for example, trying to use the socket library I got:
C:\Documents and Settings\etienne\My Documents\programming\assistant\Assistant2\Assistant2Main.cpp|151|undefined reference to `_imp___ZN14wxSocketClientC1Ei|
Then i add the libwxbase28_net.a lib to the linker, and then I got many "multiple declaration" error.

If I use the dll ( on project wizard) then the undefined reference to remains even if I add some library...

I've checked most of tutorial, I really think I miss something, so if anyone have experienced the same problems and find a way to fix it, or to perform dynamic linking, or any tutorial related, I would be thanks full.

Thanks

ouch67
Earned some good credits
Earned some good credits
Posts: 134
Joined: Sun Mar 23, 2008 12:09 am

Re: Linker & Code Blocks problems

Post by ouch67 » Wed Jul 20, 2011 3:12 pm

Well it sounds to me like you might of set up the project wizard to use a monolithic build of wxWidgets. And what you have is the non-monolithic build. So when you add you your non-mono stuff in addition to the mono stuff already configured you get the multiple declaration errors.

But no worries you can just remove the monolithic library listed in the linker.

For your undefined problems... because you have a non-monolithic build there are multiple libraries you need to add to get the features you need. you will need base and core for sure though. (make sure core is before base otherwise you might get some problems.) Then add whatever extras you need.

Post Reply