Hi,
i read a lot postings regarding linking issues with mingw and also a lot of workarounds. But the official statement is, that i should be able to use fmod also in mingw. I am using
fmodstudioapi10607win-installer
What have i done to test this so far?
-
I copied the play_stream.cpp, common.h and common_platform.h into a testfolder
-
changed the function name to
int main(int argc, char **argv)
-
copied all .h and .hpp from the inc-folder to c:\fmod\inc
-
copied fmod64.dll from the lib-folder to c:\fmod\lib
-
created a make-file
INCLUDE_PATH = -Ic:/fmod/inc
LIBRARY_PATH = -Lc:/fmod/lib/
LIBS = -lfmod64
all: play_stream.cpp
g++ -std=c++11 play_stream.cpp -o play_stream $(INCLUDE_PATH) $(LIBRARY_PATH) $(LIBS)
But when i compile (and link) i get a lot of undefined reference like:
play_stream.cpp:(.text+0x31): undefined reference to `Common_Init(void**)'
play_stream.cpp:(.text+0x57): undefined reference to `ERRCHECK_fn(FMOD_RESULT, char const*, int)'
play_stream.cpp:(.text+0x67): undefined reference to `FMOD::System::getVersion(unsigned int*)'
play_stream.cpp:(.text+0x81): undefined reference to `ERRCHECK_fn(FMOD_RESULT, char const*, int)'
play_stream.cpp:(.text+0xa2): undefined reference to `Common_Fatal(char const*, ...)'
play_stream.cpp:(.text+0xc0): undefined reference to `FMOD::System::init(int, unsigned int, void*)'
play_stream.cpp:(.text+0xda): undefined reference to `ERRCHECK_fn(FMOD_RESULT, char const*, int)'
play_stream.cpp:(.text+0xe6): undefined reference to `Common_MediaPath(char const*)'