0
0

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.

Edit: FIX’D!

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…
[quote:1b98sf4o]
-lLib1 -lLib2 -Lib3 -lfmod -lEngine
[/quote:1b98sf4o]
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
[quote:1b98sf4o]
-lEngine -lLib1 -lLib2 -Lib3 -lfmod
[/quote:1b98sf4o]

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.