OneLoneCoder/olcPixelGameEngine

[Linux] undefined reference to OLC::SOUND::Functions

gurkanctn opened this issue · 2 comments

I've installed the ALSA-DEV libraries (namely, libasound2-dev).

While compiling and linking, with the -lasound option,
almost all function calls generate a "undefined reference to OLC::SOUND::functionName", where function name is any of { PLAYSAMPLE, STOP, etc }.

Any hints?

Did you define OLC_PGEX_SOUND in your main.cpp file or in any source file exactly once and never again?

Of course I hadn't :)

I wasn't defining OLC_PGEX_SOUND on Windows, so couldn't think about it (and didn't read enough docs maybe). But I knew this would be a simple one!

Now my game works on both Windows and Linux, with sounds! Thanks @gorbit99.