Linker question

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jul 2008
Posts: 111
Reputation: clutchkiller is an unknown quantity at this point 
Solved Threads: 1
clutchkiller's Avatar
clutchkiller clutchkiller is offline Offline
Junior Poster

Linker question

 
0
  #1
May 11th, 2009
I am writing an app right now that needs winmm.lib. I tried typing winmm.lib in the project properties under the correct section, but kept saying that does not exist. So i did a little research and found that if i type -lwinmm it works. I am using dev-c++. Can anyone tell me why this is and how the syntax worked? Thanks
>That confuses me =(
Get used to it. Good programmers are in a constant state of confusion.
>Looks like i have some quasi specifics to investigate! Up Up And AWAY!
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 751
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: Linker question

 
0
  #2
May 12th, 2009
Unix compilers by tradition omitted the library suffix when passing library names to the linker.

Dev-C++ uses the GNU C compiler, which inherits that tradition.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 109
Reputation: Stinomus is on a distinguished road 
Solved Threads: 16
Stinomus Stinomus is offline Offline
Junior Poster

Re: Linker question

 
0
  #3
May 13th, 2009
Standard unix style static library syntax is:

libName.lib

And you specify this to the GNU linker (used by dev-c++) using the -l option by name only:


The linker will then resolve this to the filename of the library.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 111
Reputation: clutchkiller is an unknown quantity at this point 
Solved Threads: 1
clutchkiller's Avatar
clutchkiller clutchkiller is offline Offline
Junior Poster

Re: Linker question

 
0
  #4
May 14th, 2009
Thanks
>That confuses me =(
Get used to it. Good programmers are in a constant state of confusion.
>Looks like i have some quasi specifics to investigate! Up Up And AWAY!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC