943,544 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 413
  • C++ RSS
May 11th, 2009
0

Linker question

Expand Post »
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
Similar Threads
Reputation Points: 23
Solved Threads: 3
Junior Poster
clutchkiller is offline Offline
181 posts
since Jul 2008
May 12th, 2009
0

Re: Linker question

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.
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005
May 13th, 2009
0

Re: Linker question

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:

-lName

The linker will then resolve this to the filename of the library.
Reputation Points: 58
Solved Threads: 17
Junior Poster
Stinomus is offline Offline
109 posts
since May 2009
May 14th, 2009
0

Re: Linker question

Thanks
Reputation Points: 23
Solved Threads: 3
Junior Poster
clutchkiller is offline Offline
181 posts
since Jul 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Simple AES with SHA (as hash) encryption
Next Thread in C++ Forum Timeline: read a text file, find max value, and output new line





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC