[SOLVED] ld.exe: cannot find -lwxmsw30, ideas?

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
AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

[SOLVED] ld.exe: cannot find -lwxmsw30, ideas?

Post by AshtonC1 » Thu Mar 05, 2015 3:02 pm

I am new to wxWidgets, using with CodeBlocks and learning the rules for creating new projects, so please try to be patient with any obvious questions that may appear here.

I am testing a project from this article: http://www.codeproject.com/Articles/814 ... x5015293xx
But I'm getting 4 strange compile errors.

Edit - update, solved all but item one.
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw30u
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lwxpng
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lwxjpeg
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lwxtiff
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lwxzlib

What could cause this?

full build log attached.
Attachments
CBL.txt
(1.09 KiB) Downloaded 636 times
Last edited by AshtonC1 on Sat Mar 07, 2015 5:11 pm, edited 5 times in total.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 418
Joined: Fri Nov 03, 2006 2:00 pm

Re: ld.exe: cannot find -lwxpng, and 3 more. Is ld.exe probl

Post by stahta01 » Fri Mar 06, 2015 12:28 am

Post the full Code::Blocks re-build log.
http://wiki.codeblocks.org/index.php?ti ... problem.3F

Edit: I just noticed the attachment try to download it.

This is wrong!

Code: Select all

-L(invalid)\lib\gcc_lib
Please correct your linker search path in your CB Project.


Tim S.

AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

Re: ld.exe: cannot find -lwxpng, and 3 more. Is ld.exe probl

Post by AshtonC1 » Fri Mar 06, 2015 12:50 am

Tim
Thanks for your response.
Please correct your linker search path in your CB Project.
Is the Linker Search Path,
Under the Global Compiler Settings, Linker Settings tab(empty) or Search Directories(empty) or Toolchain executables, Linker For libs path?

Oh yes, the Global Variable Editor popped open when I first opened this project.
The obj, bin, cflags, & lflags fields are empty. No user defined fields.
The lib field = C:\wxWidgets-3.0.2\lib

My setting look conflicting here.
Image
Last edited by AshtonC1 on Fri Mar 06, 2015 1:12 am, edited 1 time in total.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 418
Joined: Fri Nov 03, 2006 2:00 pm

Re: ld.exe: cannot find -lwxpng, and 3 more. Is ld.exe probl

Post by stahta01 » Fri Mar 06, 2015 1:05 am

AshtonC1 wrote:Tim
Thanks for your response.
Please correct your linker search path in your CB Project.
Is the Linker Search Path,
Under the Global Compiler Settings, Linker Settings tab(empty) or Search Directories(empty) or Toolchain executables, Linker For libs path?

Oh yes, the Global Variable Editor popped open when I first opened this project.
The obj, bin, cflags, & lflags fields are empty. No user defined fields.
The lib field = C:\wxWidgets-3.0.2\lib
Try setting the Global Variable base field to a valid value likely C:\wxWidgets-3.0.2 in your case.

Tim S.

AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

Re: ld.exe: cannot find -lwxpng, and 3 more. Is ld.exe probl

Post by AshtonC1 » Fri Mar 06, 2015 1:23 am

I have the errors down to One.
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw30u

My folder was named with an s during a compile.

Image

See new Build log attached.
Attachments
BL_1er.txt
(624 Bytes) Downloaded 663 times

AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

Re: ld.exe: cannot find -lwxmsw30, ideas?

Post by AshtonC1 » Sat Mar 07, 2015 4:50 pm

UPDATE

I determined that the file libwxmsw30u.a was missing from the C:\wxWidgets-3.0.2\lib\gcc_dll directory, so I copied and pasted it from another pc with wxWidgets & CodeBlocks which operates and builds as properly.

Now, this is the latest build log:

Code: Select all

-------------- Build: Debug in 6Martest (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -LC:\wxWidgets-3.0.2\lib\gcc_dll -LC:\wxWidgets-3.0.2\lib\gcc_dll -o bin\Debug\6Martest.exe obj\Debug\_MartestApp.o obj\Debug\_MartestMain.o  obj\Debug\resource.res -mthreads  -lwxmsw30u -mwindows
Warning: .drectve `-aligncomm:"___hexdig_D2A",5' unrecognized
/mingw/lib/libmingw32.a(setargv.o):(.text+0x30): undefined reference to `___chkstk_ms'
/mingw/lib/libmingwex.a(glob.o):(.text+0x673): undefined reference to `___chkstk_ms'
/mingw/lib/libmingwex.a(glob.o):(.text+0x7e0): undefined reference to `___chkstk_ms'
/mingw/lib/libmingwex.a(glob.o):(.text+0x81d): undefined reference to `___chkstk_ms'
/mingw/lib/libmingwex.a(glob.o):(.text+0x934): undefined reference to `___chkstk_ms'
/mingw/lib/libmingwex.a(glob.o):(.text+0xb78): more undefined references to `___chkstk_ms' follow
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 9 second(s))
6 error(s), 1 warning(s) (0 minute(s), 9 second(s))
Then I realized I had an old MinGW installed im my C:\ directory, renamed it 'zz_MinGW', and the build is error free.

Code: Select all

-------------- Build: Debug in 6Martest (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -LC:\wxWidgets-3.0.2\lib\gcc_dll -LC:\wxWidgets-3.0.2\lib\gcc_dll -o bin\Debug\6Martest.exe obj\Debug\_MartestApp.o obj\Debug\_MartestMain.o  obj\Debug\resource.res -mthreads  -lwxmsw30u -mwindows
Output file is bin\Debug\6Martest.exe with size 2.54 MB
Process terminated with status 0 (0 minute(s), 5 second(s))
0 error(s), 0 warning(s) (0 minute(s), 5 second(s))

Post Reply