为Visual Studio 2008配置OpenAL

时间:2011-03-26 14:12:31

标签: visual-studio-2008 compiler-errors openal

我一直在尝试使用Visual Studio 2008中的OpenAL SDK构建示例代码。我收到以下错误日志:

1>------ Build started: Project: OpenALTut, Configuration: Debug Win32 ------
1>Linking...
1>Capture.obj : error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function _main
1>Framework.obj : error LNK2019: unresolved external symbol "public: __thiscall CWaves::CWaves(void)" (??0CWaves@@QAE@XZ) referenced in function "void __cdecl ALFWInit(void)" (?ALFWInit@@YAXXZ)
1>Framework.obj : error LNK2019: unresolved external symbol "public: char * __thiscall ALDeviceList::GetDeviceName(int)" (?GetDeviceName@ALDeviceList@@QAEPADH@Z) referenced in function "char __cdecl ALFWInitOpenAL(void)" (?ALFWInitOpenAL@@YADXZ)
1>Framework.obj : error LNK2019: unresolved external symbol "public: int __thiscall ALDeviceList::GetDefaultDevice(void)" (?GetDefaultDevice@ALDeviceList@@QAEHXZ) referenced in function "char __cdecl ALFWInitOpenAL(void)" (?ALFWInitOpenAL@@YADXZ)
1>Framework.obj : error LNK2019: unresolved external symbol "public: int __thiscall ALDeviceList::GetNumDevices(void)" (?GetNumDevices@ALDeviceList@@QAEHXZ) referenced in function "char __cdecl ALFWInitOpenAL(void)" (?ALFWInitOpenAL@@YADXZ)
1>Framework.obj : error LNK2019: unresolved external symbol "public: __thiscall ALDeviceList::ALDeviceList(void)" (??0ALDeviceList@@QAE@XZ) referenced in function "char __cdecl ALFWInitOpenAL(void)" (?ALFWInitOpenAL@@YADXZ)
1>Framework.obj : error LNK2019: unresolved external symbol "public: __thiscall ALDeviceList::~ALDeviceList(void)" (??1ALDeviceList@@QAE@XZ) referenced in function "public: void * __thiscall ALDeviceList::`scalar deleting destructor'(unsigned int)" (??_GALDeviceList@@QAEPAXI@Z)
1>Framework.obj : error LNK2019: unresolved external symbol "public: enum WAVERESULT __thiscall CWaves::DeleteWaveFile(int)" (?DeleteWaveFile@CWaves@@QAE?AW4WAVERESULT@@H@Z) referenced in function "char __cdecl ALFWLoadWaveToBuffer(char const *,unsigned int,int)" (?ALFWLoadWaveToBuffer@@YADPBDIH@Z)
1>Framework.obj : error LNK2019: unresolved external symbol "public: enum WAVERESULT __thiscall CWaves::GetWaveALBufferFormat(int,int (__cdecl*)(char const *),unsigned long *)" (?GetWaveALBufferFormat@CWaves@@QAE?AW4WAVERESULT@@HP6AHPBD@ZPAK@Z) referenced in function "char __cdecl ALFWLoadWaveToBuffer(char const *,unsigned int,int)" (?ALFWLoadWaveToBuffer@@YADPBDIH@Z)
1>Framework.obj : error LNK2019: unresolved external symbol "public: enum WAVERESULT __thiscall CWaves::GetWaveFrequency(int,unsigned long *)" (?GetWaveFrequency@CWaves@@QAE?AW4WAVERESULT@@HPAK@Z) referenced in function "char __cdecl ALFWLoadWaveToBuffer(char const *,unsigned int,int)" (?ALFWLoadWaveToBuffer@@YADPBDIH@Z)
1>Framework.obj : error LNK2019: unresolved external symbol "public: enum WAVERESULT __thiscall CWaves::GetWaveData(int,void * *)" (?GetWaveData@CWaves@@QAE?AW4WAVERESULT@@HPAPAX@Z) referenced in function "char __cdecl ALFWLoadWaveToBuffer(char const *,unsigned int,int)" (?ALFWLoadWaveToBuffer@@YADPBDIH@Z)
1>Framework.obj : error LNK2019: unresolved external symbol "public: enum WAVERESULT __thiscall CWaves::GetWaveSize(int,unsigned long *)" (?GetWaveSize@CWaves@@QAE?AW4WAVERESULT@@HPAK@Z) referenced in function "char __cdecl ALFWLoadWaveToBuffer(char const *,unsigned int,int)" (?ALFWLoadWaveToBuffer@@YADPBDIH@Z)
1>Framework.obj : error LNK2019: unresolved external symbol "public: enum WAVERESULT __thiscall CWaves::LoadWaveFile(char const *,int *)" (?LoadWaveFile@CWaves@@QAE?AW4WAVERESULT@@PBDPAH@Z) referenced in function "char __cdecl ALFWLoadWaveToBuffer(char const *,unsigned int,int)" (?ALFWLoadWaveToBuffer@@YADPBDIH@Z)
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。任何解决方案?

1 个答案:

答案 0 :(得分:3)

  

错误LNK2019:未解析的外部符号_ imp _timeGetTime @ 0

您需要链接到 winmm.lib 。 (您可以在Windows SDK中找到它)

它在Windows上提供各种多媒体功能。