0

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

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by clutchkiller
0

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.

0

Standard unix style static library syntax is:

lib[B]Name[/B].lib

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

-l[B]Name[/B]

The linker will then resolve this to the filename of the library.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.