Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » g++ ld gdi32.lib(g++ ld gdi32.lib)
g++ ld gdi32.lib [message #1732683] Thu, 19 May 2016 07:44 Go to next message
Liu Hailu is currently offline Liu HailuFriend
Messages: 2
Registered: May 2016
Junior Member
g++ -o CP003.exe "src\\CP003.o" -l "-lC:\\Users\\Administrator\\Desktop\\Gdi32.Lib"
c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ld.exe: cannot find -l-lC:\Users\Administrator\Desktop\Gdi32.Lib
collect2.exe: error: ld returned 1 exit status
Re: g++ ld gdi32.lib [message #1732972 is a reply to message #1732683] Mon, 23 May 2016 13:46 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Quote:
g++ -o CP003.exe "src\\CP003.o" -l "-lC:\\Users\\Administrator\\Desktop\\Gdi32.Lib"


The command is incorrect.
1) -lxxx causes the loader to search the lib paths for libxxx
2) you tried to give a path that starts with "-l". when you intended to start it with C:
3) If you are going to use the full path then omit the flag altogether and just place it in the command line.

Read here about how the -L and -l flags work on the command line
https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html

[Updated on: Tue, 24 May 2016 09:03]

Report message to a moderator

Previous Topic:Cant find c++ compiler
Next Topic:Eclipse Mars: Setting up a remote CDT project
Goto Forum:
  


Current Time: Tue Mar 19 05:20:44 GMT 2024

Powered by FUDForum. Page generated in 0.03252 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top