Hello, I am using mingw with fmod, and am having trouble getting fmod working with mingw.
I was previously using visual studio, and am now using the build system SCons to build my program with visual studio’s compiler and mingw.
I have it setup so that when using visual studio to build, it links with fmodvc.lib, and when building with mingw, it adds -lfmod to the linker command line.
However, I still get undefined reference errors. Is there some linker flag I am missing? I know it is finding libfmod.a, because if I rename that file and try to compile, it tells me it can’t find it.
Heres what the problem was.
I was buidling a library ‘Engine’ which depended on fmod, and then building a series of apps that depended on ‘Engine’
When linking those apps, I used…
-lLib1 -lLib2 -Lib3 -lfmod -lEngine
However, gcc seems to check right to left kinda, and hits Engine and gets confused about all the references to fmod. I had to use
-lEngine -lLib1 -lLib2 -Lib3 -lfmod
- Dantarion asked 9 years ago
- You must login to post comments