Author Topic: Problem linking last wxWidget-2.9.x with last Nightly  (Read 6212 times)

Offline ElKeBusK

  • Single posting newcomer
  • *
  • Posts: 6
Problem linking last wxWidget-2.9.x with last Nightly
« on: February 03, 2008, 10:15:29 am »
in few words, the linker throws this error:
ld: cannot find -lwxmswd_core

I followed all steps in http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef except one, set the compiler flags since I have no clue where to put them (the article is quite obscure about that) and I'm completely noob with gcc (I've got experience with Borland Builder and I never had to take much care about linker options).

Seems that is a missing library but I did a search for it in my hard drive but there's not such file. The paths are all set correct (even the one of the famous wx\setup.h)

Thx in advance for the help

Note, I typed wxWidget-2.9.x since the dlls generated after compilation are all named wxmsw290*.dll

Offline ElKeBusK

  • Single posting newcomer
  • *
  • Posts: 6
Re: Problem linking last wxWidget-2.9.x with last Nightly
« Reply #1 on: February 03, 2008, 10:51:05 am »
I answer to myself.

Of course the problem is missing libraries. In fact all libraries specified to be used by the linker doesn't exist or exists with different name.
I'm going to rebuild the libraries from scratch to see if that solves the problems.

Offline orel

  • Multiple posting newcomer
  • *
  • Posts: 96
Re: Problem linking last wxWidget-2.9.x with last Nightly
« Reply #2 on: February 03, 2008, 01:57:14 pm »
dont forget gcc doesn't need the "lib" prefix in front of the library name nor the ".lib" or ".a" extension.
I mean for the linker (ld, not gcc) all that represents the same library:
  • libwxcore.a
  • libwxcore.lib
  • wxcore

That could be the source of your problem
windows XP SP2
mingw gcc 3.4.5
svn Code::Blocks and M$ Visual Studio 2005 and .NET to eat!! SVNInside plugin :http://forums.codeblocks.org/index.php/topic,7063.0.html

Offline ElKeBusK

  • Single posting newcomer
  • *
  • Posts: 6
Re: Problem linking last wxWidget-2.9.x with last Nightly
« Reply #3 on: February 03, 2008, 01:59:37 pm »
Problem solved.

Seems that the wizard messed up with my compilation including libraries that were not necessary and not linking the dlls. I guess that was my fault due a mistake (I don't know which one) I could make the first time I compiled the libraries.

I solved the problem wipping out the previous install of wxWidgets and reinstalling using the .exe installer. Then I compiled following step by step the intruccions given in \BuildCVS.txt and docs\msw\install.txt and now they work perfectly.

Sorry for this post since all the problems were my fault  :(

Offline ElKeBusK

  • Single posting newcomer
  • *
  • Posts: 6
Re: Problem linking last wxWidget-2.9.x with last Nightly
« Reply #4 on: February 03, 2008, 02:08:47 pm »
dont forget gcc doesn't need the "lib" prefix in front of the library name nor the ".lib" or ".a" extension.
I mean for the linker (ld, not gcc) all that represents the same library:
  • libwxcore.a
  • libwxcore.lib
  • wxcore

That could be the source of your problem

No, there were no such files in my harddrive. Not even now that I solved the problem.
I think those files are compile embedded in the dlls and in libwxmsw28u.a when you use SHARE=1 and MONOLITHIC=1 settings in the make command line and are compile in separated files with those names if SHARE=0 and MONOLITHIC=0. I suppose someone that had used these last settings could comfirm my guess :)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Problem linking last wxWidget-2.9.x with last Nightly
« Reply #5 on: February 03, 2008, 02:17:58 pm »
Seems that the wizard messed up with my compilation including libraries that were not necessary and not linking the dlls. I guess that was my fault due a mistake (I don't know which one) I could make the first time I compiled the libraries.

Sorry to say this, but wizard didn't mess up your project. Rather you selected wrong options. There is an option, "Use Monolithic build"; check that and recreate a project. That should solve your problem. :)
Be a part of the solution, not a part of the problem.

Offline ElKeBusK

  • Single posting newcomer
  • *
  • Posts: 6
Re: Problem linking last wxWidget-2.9.x with last Nightly
« Reply #6 on: February 04, 2008, 12:28:51 pm »
Sorry to say this, but wizard didn't mess up your project. Rather you selected wrong options. There is an option, "Use Monolithic build"; check that and recreate a project. That should solve your problem. :)
I said it messed up because it didn't give me the option the first time I compiled wxWidgets.
Now it does, so everything is ok :)