Author Topic: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project  (Read 34282 times)

Vanchi

  • Guest
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


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
« Reply #2 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).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline bitcero

  • Single posting newcomer
  • *
  • Posts: 7
Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
« Reply #3 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
 

Anuk

  • Guest
Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
« Reply #4 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?

Anuk

  • Guest
Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
« Reply #5 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.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
« Reply #6 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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Anuk

  • Guest
Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
« Reply #7 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.

Offline exploder

  • Single posting newcomer
  • *
  • Posts: 3
Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
« Reply #8 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.....

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
« Reply #9 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

madlink

  • Guest
Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
« Reply #10 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?

Alex_M

  • Guest
Re: "ld.exe cannot find -lwxmsw" when compiling a wxWindow Project
« Reply #11 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.
« Last Edit: March 30, 2009, 08:19:04 pm by Alex_M »