2011-03-26 138 views
4

我一直在試圖建立在Visual Studio 2008中我收到以下錯誤日誌OpenAL的SDK給定的樣本代碼:配置的OpenAL爲Visual Studio 2008

1>------ Build started: Project: OpenALTut, Configuration: Debug Win32 ------ 
1>Linking... 
1>Capture.obj : error LNK2019: unresolved external symbol [email protected] referenced in function _main 
1>Framework.obj : error LNK2019: unresolved external symbol "public: __thiscall CWaves::CWaves(void)" ([email protected]@[email protected]) referenced in function "void __cdecl ALFWInit(void)" ([email protected]@YAXXZ) 
1>Framework.obj : error LNK2019: unresolved external symbol "public: char * __thiscall ALDeviceList::GetDeviceName(int)" ([email protected]@@[email protected]) referenced in function "char __cdecl ALFWInitOpenAL(void)" ([email protected]@YADXZ) 
1>Framework.obj : error LNK2019: unresolved external symbol "public: int __thiscall ALDeviceList::GetDefaultDevice(void)" ([email protected]@@QAEHXZ) referenced in function "char __cdecl ALFWInitOpenAL(void)" ([email protected]@YADXZ) 
1>Framework.obj : error LNK2019: unresolved external symbol "public: int __thiscall ALDeviceList::GetNumDevices(void)" ([email protected]@@QAEHXZ) referenced in function "char __cdecl ALFWInitOpenAL(void)" ([email protected]@YADXZ) 
1>Framework.obj : error LNK2019: unresolved external symbol "public: __thiscall ALDeviceList::ALDeviceList(void)" ([email protected]@[email protected]) referenced in function "char __cdecl ALFWInitOpenAL(void)" ([email protected]@YADXZ) 
1>Framework.obj : error LNK2019: unresolved external symbol "public: __thiscall ALDeviceList::~ALDeviceList(void)" ([email protected]@[email protected]) referenced in function "public: void * __thiscall ALDeviceList::`scalar deleting destructor'(unsigned int)" ([email protected]@[email protected]) 
1>Framework.obj : error LNK2019: unresolved external symbol "public: enum WAVERESULT __thiscall CWaves::DeleteWaveFile(int)" ([email protected]@@[email protected]@[email protected]) referenced in function "char __cdecl ALFWLoadWaveToBuffer(char const *,unsigned int,int)" ([email protected]@[email protected]) 
1>Framework.obj : error LNK2019: unresolved external symbol "public: enum WAVERESULT __thiscall CWaves::GetWaveALBufferFormat(int,int (__cdecl*)(char const *),unsigned long *)" ([email protected]@@[email protected]@[email protected]@Z) referenced in function "char __cdecl ALFWLoadWaveToBuffer(char const *,unsigned int,int)" ([email protected]@[email protected]) 
1>Framework.obj : error LNK2019: unresolved external symbol "public: enum WAVERESULT __thiscall CWaves::GetWaveFrequency(int,unsigned long *)" ([email protected]@@[email protected]@[email protected]) referenced in function "char __cdecl ALFWLoadWaveToBuffer(char const *,unsigned int,int)" ([email protected]@[email protected]) 
1>Framework.obj : error LNK2019: unresolved external symbol "public: enum WAVERESULT __thiscall CWaves::GetWaveData(int,void * *)" ([email protected]@@[email protected]@[email protected]) referenced in function "char __cdecl ALFWLoadWaveToBuffer(char const *,unsigned int,int)" ([email protected]@[email protected]) 
1>Framework.obj : error LNK2019: unresolved external symbol "public: enum WAVERESULT __thiscall CWaves::GetWaveSize(int,unsigned long *)" ([email protected]@@[email protected]@[email protected]) referenced in function "char __cdecl ALFWLoadWaveToBuffer(char const *,unsigned int,int)" ([email protected]@[email protected]) 
1>Framework.obj : error LNK2019: unresolved external symbol "public: enum WAVERESULT __thiscall CWaves::LoadWaveFile(char const *,int *)" ([email protected]@@[email protected]@[email protected]) referenced in function "char __cdecl ALFWLoadWaveToBuffer(char const *,unsigned int,int)" ([email protected]@[email protected]) 
1>C:\Users\Rahul\Documents\Visual Studio 2008\Projects\OpenALTut\Debug\OpenALTut.exe : fatal error LNK1120: 13 unresolved externals 
1>Build log was saved at "file://c:\Users\Rahul\Documents\Visual Studio 2008\Projects\OpenALTut\OpenALTut\Debug\BuildLog.htm" 
1>OpenALTut - 14 error(s), 0 warning(s) 
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 

我已經添加的所有文件,包括和Visual Studio中的DLL。任何解決方案

回答

3

錯誤LNK2019:解析外部符號_ 小鬼 _timeGetTime @ 0

您需要鏈接到WINMM.LIB。 (你可以找到它作爲Windows SDK的一部分)

它在Windows上提供了各種多媒體功能。