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

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.