Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking to winmm.dll from GCC

Tags:

c

gcc

dll

linker

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?

like image 455
Mike2012 Avatar asked Feb 17 '14 19:02

Mike2012


1 Answers

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

like image 115
Mike2012 Avatar answered Oct 23 '22 19:10

Mike2012