Mike2012
Mike2012

Reputation: 7725

Linking to winmm.dll from GCC

I would like to use mciSendString from gcc to build a dll so I need to link to the winmm.dll library.

I tried something like this:

gcc -c -o dllTest.o dllTest.c -lC:\Windows\System32\winmm.dll

But when i tried to build the dll I get an undefined reference for mciSendString.

What is the proper way to link to winmm from gcc?

Upvotes: 9

Views: 5193

Answers (1)

Mike2012
Mike2012

Reputation: 7725

In the end I was able to get it to work with -lwinmm instead of the big path to the library.

Upvotes: 13

Related Questions