News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

"ld.exe cannot find -lwxmsw" when compiling a wxWindow Project

Started by Vanchi, April 07, 2006, 09:56:22 PM

Previous topic - Next topic

Vanchi

Hi,

I have C::B 1.0 with the latest nightly-build-patch (7/4/6) running on a computer with Windows 2000. (Using the MinGW compiler)

When I try to compile any wxWindow project, I always get the "ld.exe cannot find -lwxmsw" error.

I serched on the web and I found a message with the same trouble as me, but I couldn't understand the solution.

http://forums.next.codeblocks.org/index.php?PHPSESSID=74d94bdf28a85b3a2031541331ccbab2&topic=706.msg4688

I also followed the link, but I couldn't find anything on the C::B wiki.

Do you know what I have to do?

Thanks

Michael

[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

thomas

First of all, you must make sure that you do have a monolithic library (see Michael's post on how to get one), and then you must make sure the linker can find it (this is done by setting the wx global variable to the wxWidgets root folder).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

bitcero

try this: when you create a new wxwidgets template, in the Proyect Options Select : Using UNICODE wxWidgets DLL.
this error message in the link process when you compiled a unicode version of wxwidgets and select Using wxWidgets without the Unicode option.

i hope this help

Saludos desde COLOMBIA !! :D

Anuk

I have same problem: "ld.exe cannot find -lwxmsw"

I use latest CVS of wxWindows.

I have take a look in wxWindows libs and there is no "wxmsw" lib... all libs begin with "lib......  .o". Is something wrong?

Anuk

fixed!!!

Okay, for cvs version, you need to change in linker option WXMSW to WXMSW27 and works, also keep in mind to put this first, i got linker error if i have put it last.

thomas

Quote from: Anuk on April 08, 2006, 03:43:15 PMOkay, for cvs version, you need to change in linker option WXMSW to WXMSW27 and works, also keep in mind to put this first, i got linker error if i have put it last.
Not true. The SVN wxWidgets template already uses wxmsw26 and wxmsw26u, respectively.
If you have wxmsw in your linker options, then you use an old template.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Anuk

Quote from: thomas on April 08, 2006, 08:59:11 PM
Quote from: Anuk on April 08, 2006, 03:43:15 PMOkay, for cvs version, you need to change in linker option WXMSW to WXMSW27 and works, also keep in mind to put this first, i got linker error if i have put it last.
Not true. The SVN wxWidgets template already uses wxmsw26 and wxmsw26u, respectively.
If you have wxmsw in your linker options, then you use an old template.

I have WXMSW27 , notice 27 not 26.

exploder

I cannot understand the resolved solution.
Compiled wxWidgets with gcc, generated libs are "libwxmsw28u.a" and "wxmsw28u_gcc_custom.dll",
when using CB compiled wxWidgets project, how to find "-lwxmsw28u".
waiting for the wonderful anuser.....

JGM

Quote from: exploder on January 30, 2008, 04:47:07 AM
I cannot understand the resolved solution.
Compiled wxWidgets with gcc, generated libs are "libwxmsw28u.a" and "wxmsw28u_gcc_custom.dll",
when using CB compiled wxWidgets project, how to find "-lwxmsw28u".
waiting for the wonderful anuser.....

you have to add the directory ($wxwidgets)/lib/gcc_dll to the search directories of the linker

madlink

Hi, i have the same problem and added the path to the linker search directories. But it gives me the same message. Is there anything else to do?

Alex_M

Quote from: madlink on March 30, 2009, 05:54:28 PM
Hi, i have the same problem and added the path to the linker search directories. But it gives me the same message. Is there anything else to do?
Are they both(the project and wxWidgets) on the same partition? I remember having this problem trying to build CodeBlocks SVN and it kept giving me this error until I put them on the same partition. It may also have had something to do with spaces in directories. Can't remember for sure.

EDIT: I just finished compiling CB from different partitions, so the spaces seem to be issues(at least for me).

Second EDIT: I think I may have also gone from MinGW GCC Stable to TDM 4.3.3 at that time, so that may have also solved the problem.