I have some problems linkin FMOD Ex (I have version 4.00.37). I’m trying to create a Python interface for the library with Pyrex, and when linking I get unresolved symbols. This worked fine with FMOD 3. Here’s the command line and error:
[code:agbbiuiv]D:\Programs\Microsoft Visual C++ Toolkit 2003\bin\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:D:\Programming\Python\libs /LIBPATH:D:\Programming\Python\PCBuild fmodex_vc.lib /EXPORT:initfmod build\temp.win32-2.4\Release\source\spineless\audio\driver\fmod.obj /OUT:source\spineless\audio\driver\fmod.pyd /IMPLIB:build\temp.win32-2.4\Release\source\spineless\audio\driver\fmod.lib
Creating library build\temp.win32-2.4\Release\source\spineless\audio\driver\fmod.lib and object build\temp.win32-2.4\Release\source\spineless\audio\driver\fmod.exp
fmod.obj : error LNK2019: unresolved external symbol _FMOD_System_Create referenced in function ___pyx_f_4fmod_initialize
- Knarkles asked 11 years ago
I noticed that there’s a symbol called _FMOD_System_Create@4 in the FMOD library. Is the @4 part of the symbol’s name, and if it’s not, what does it mean and why doesn’t the linker find the symbol? I don’t know enough about the internals of the linker to figure out what’s wrong. Could anybody help?
Well, although that didn’t solve the problem directly, it put me on the right track. The problem was that the WIN32 (or WIN32) symbol wasn’t defined so fmod.h used the wrong calling convention. I added /DWIN32 to compiler arguments and it works now.
Please login first to submit.