Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Vanchi on April 07, 2006, 09:56:22 pm

Title: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
Post by: Vanchi on April 07, 2006, 09:56:22 pm
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.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
Title: Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
Post by: Michael on April 07, 2006, 10:04:06 pm
Hello,

May be it could help:

http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.2_to_develop_Code::Blocks_%28MSW%29

Best wishes,
Michael
Title: Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
Post by: thomas on April 07, 2006, 10:17:07 pm
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).
Title: Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
Post by: bitcero on April 08, 2006, 01:52:27 am
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
 
Title: Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
Post by: Anuk on April 08, 2006, 12:29:10 pm
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?
Title: Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
Post by: Anuk on April 08, 2006, 03:43:15 pm
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.
Title: Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
Post by: thomas on April 08, 2006, 08:59:11 pm
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.
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.
Title: Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
Post by: Anuk on April 09, 2006, 02:56:57 am
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.
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.
Title: Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
Post by: 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.....
Title: Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
Post by: JGM on January 30, 2008, 02:47:48 pm
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
Title: Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
Post by: 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?
Title: Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
Post by: Alex_M on March 30, 2009, 07:11:12 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.