Настройка OpenAL для Visual Studio 2008

Я пытался создать пример кода с помощью OpenAL SDK в Visual Studio 2008. Я получаю следующий журнал ошибок:

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 ==========

Я добавил все включаемые файлы и dll в Visual Studio. Любые решения?


person Rahul    schedule 26.03.2011    source источник


Ответы (1)


ошибка LNK2019: неразрешенный внешний символ _imp_timeGetTime@0

Вам необходимо установить ссылку на winmm.lib. (Вы можете найти его как часть Windows SDK)

Он предоставляет различные мультимедийные функции в Windows.

person RJFalconer    schedule 26.03.2011