Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 21994

gcc: "cannot find -lasound" when compiling on Windows

$
0
0

I am compiling a C++ program on Windows. The program uses the SDL2 library. I run the following pkg-config command to obtain the correct flags to pass to the GCC compiler.

$ pkg-config sdl2 --cflags --libs

which gives output

-lpthread -lasound -IC:/sdl2/include/SDL2 -LC:/sdl2/lib -lSDL2

However when using these flags with GCC the program fails to compile, giving the error

cannot find -lasound

Is this a library I need to obtain in order to use SDL2, or am I making a mistake somewhere?


Viewing all articles
Browse latest Browse all 21994

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>