Here's my code:
Code:
#include <fmod.hpp>
#include <cstdio>
#pragma comment(lib, "fmodex_vc.lib")
using namespace std;
int main()
{
FMOD_RESULT result;
FMOD::System *system;
result = FMOD::System_Create(&system); // Create the main system object.
if (result != FMOD_OK)
{
printf("FMOD error! (%d) \n", result);
exit(-1);
}
result = system->init(100, FMOD_INIT_NORMAL, 0); // Initialize FMOD.
if (result != FMOD_OK)
{
printf("FMOD error! (%d) \n", result);
exit(-1);
}
}
The linker output says:
Code:
1>Linking...
1>SB.obj : error LNK2019: unresolved external symbol _FMOD_System_Create referenced in function "enum FMOD_RESULT __cdecl FMOD::System_Create(class FMOD::System * *)" (?System_Create@FMOD@@YA?AW4FMOD_RESULT@@PAPAVSystem@1@@Z)
1>SB.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::init(int,unsigned int,void *)" (?init@System@FMOD@@QAE?AW4FMOD_RESULT@@HIPAX@Z) referenced in function _main
1>C:\Documents and Settings\Olafs.NTWORLD-9BA1E5E\Desktop\Misc\Programming\Visual C++ Projects\SB\Debug\SB.exe : fatal error LNK1120: 2 unresolved externals
1>SB - 3 error(s), 0 warning(s)
I can't figure out what's the problem, what other libraries should I link? I just copied and pasted the code from the documentation and added #pragma comment(lib, "fmodex_vc.lib")
BTW I'm using VC++2005 express