Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

AkSoundEngine.lib(AkLEngine.obj) : error LNK2019: unresolved external symbol __imp__RegisterDeviceNotification

+2 votes
Hello everyone,

 

I am trying to integrate wwise into our windows 8.1 project. and keep getting the same errors.We are using Visual Studio 2015.

I have set the additinal lib directory to Wwise v2015.1.5 build 5533\SDK\Win32_vc120\Debug\lib

I have also set the additional include directory to Wwise v2015.1.5 build 5533\SDK\include

Our platform tool set is set to Visual Studio 2013(v120)

Everything compiles fine. But the moment I call AK::MemoryMgr::init(someval); All hell brokes and I endup with the following 6 errors

 

2>AkSoundEngine.lib(AkLEngine.obj) : error LNK2019: unresolved external symbol __imp__RegisterDeviceNotificationW@12 referenced in function "private: static void __cdecl CAkLEngine::RegisterDeviceChange(void)" (?RegisterDeviceChange@CAkLEngine@@CAXXZ)
2>AkSoundEngine.lib(AkLEngine.obj) : error LNK2019: unresolved external symbol __imp__UnregisterDeviceNotification@4 referenced in function "private: static void __cdecl CAkLEngine::UnregisterDeviceChange(void)" (?UnregisterDeviceChange@CAkLEngine@@CAXXZ)
2>AkSoundEngine.lib(AkLEngine.obj) : error LNK2019: unresolved external symbol __imp__CallWindowProcW@20 referenced in function "private: static long __stdcall CAkLEngine::InternalWindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?InternalWindowProc@CAkLEngine@@CGJPAUHWND__@@IIJ@Z)
2>AkSoundEngine.lib(AkLEngine.obj) : error LNK2019: unresolved external symbol __imp__GetForegroundWindow@0 referenced in function "public: static void __cdecl CAkLEngine::GetDefaultPlatformInitSettings(struct AkPlatformInitSettings &)" (?GetDefaultPlatformInitSettings@CAkLEngine@@SAXAAUAkPlatformInitSettings@@@Z)
2>AkSoundEngine.lib(AkLEngine.obj) : error LNK2019: unresolved external symbol __imp__GetWindowLongW@8 referenced in function "private: static void __cdecl CAkLEngine::UnregisterDeviceChange(void)" (?UnregisterDeviceChange@CAkLEngine@@CAXXZ)
2>AkSoundEngine.lib(AkLEngine.obj) : error LNK2019: unresolved external symbol __imp__SetWindowLongW@12 referenced in function "private: static void __cdecl CAkLEngine::RegisterDeviceChange(void)" (?RegisterDeviceChange@CAkLEngine@@CAXXZ)

I am wondering if I am using the correct lib files (Win32_vc120). I have also tried to use (Metro_Win32_vc120) libs but they also bring up some other linking errors. I hope some one could help us on this as we are literally stuck on this issue.

Thank you in advance!
asked Feb 23, 2016 in General Discussion by Yucel K. (180 points)

1 Answer

+1 vote

Ok Just managed to solve the problem! On this occasion the reason I was having these errors was because i was using wrong lib files. I was using the Win32 libs. which in fact it should have been Metro_Win32 since I am doing a windows 8.1 app.  Previously what made me confused is that when i added the correct libs, I was still getting bunch of errors Here is some of it. I managed to solve that problem too by adding the functions within the threadEmulation name space into the AK name space. I am not sure if this is a correct way of doing it but if someone knows a proper way of doing it please do let me know. Followings were the errors i was getting.

2>AkStreamMgr.lib(AkIOThread.obj) : error LNK2001: unresolved external symbol "void * __stdcall AK::ThreadEmulation::CreateThread(unsigned long (__stdcall*)(void *),void *,unsigned long)" (?CreateThread@ThreadEmulation@AK@@YGPAXP6GKPAX@Z0K@Z)
2>AkSoundEngine.lib(AkMonitor.obj) : error LNK2001: unresolved external symbol "void * __stdcall AK::ThreadEmulation::CreateThread(unsigned long (__stdcall*)(void *),void *,unsigned long)" (?CreateThread@ThreadEmulation@AK@@YGPAXP6GKPAX@Z0K@Z)
2>AkSoundEngine.lib(AkLEngine_Common.obj) : error LNK2001: unresolved external symbol "void * __stdcall AK::ThreadEmulation::CreateThread(unsigned long (__stdcall*)(void *),void *,unsigned long)" (?CreateThread@ThreadEmulation@AK@@YGPAXP6GKPAX@Z0K@Z)
2>AkSoundEngine.lib(AkThreadedBankMgr.obj) : error LNK2001: unresolved external symbol "void * __stdcall AK::ThreadEmulation::CreateThread(unsigned long (__stdcall*)(void *),void *,unsigned long)" (?CreateThread@ThreadEmulation@AK@@YGPAXP6GKPAX@Z0K@Z)
2>AkSoundEngine.lib(AkAudioThread.obj) : error LNK2001: unresolved external symbol "void * __stdcall AK::ThreadEmulation::CreateThread(unsigned long (__stdcall*)(void *),void *,unsigned long)" (?CreateThread@ThreadEmulation@AK@@YGPAXP6GKPAX@Z0K@Z)
2>AkSoundEngine.lib(AkAudioMgr.obj) : error LNK2019: unresolved external symbol "void __stdcall AK::ThreadEmulation::Sleep(unsigned long)" (?Sleep@ThreadEmulation@AK@@YGXK@Z) referenced in function "void __cdecl AKPLATFORM::AkSleep(unsigned long)" (?AkSleep@AKPLATFORM@@YAXK@Z)
2>AkSoundEngine.lib(AkLEngine_Common.obj) : error LNK2001: unresolved external symbol "void __stdcall AK::ThreadEmulation::Sleep(unsigned long)" (?Sleep@ThreadEmulation@AK@@YGXK@Z)
2>AkStreamMgr.lib(AkIOThread.obj) : error LNK2019: unresolved external symbol "void __stdcall AK::ThreadEmulation::SleepEx(unsigned long,int)" (?SleepEx@ThreadEmulation@AK@@YGXKH@Z) referenced in function "protected: static unsigned long __stdcall AK::StreamMgr::CAkIOThread::IOSchedThread(void *)" (?IOSchedThread@CAkIOThread@StreamMgr@AK@@KGKPAX@Z)
2>C:\SkyfishProjects\Cocos2d\projects\elise1.0.3\elise\proj.win8.1-universal\Debug\elise.Windows\elise.Windows.exe : fatal error LNK1120: 3 unresolved externals

EDIT: I think I managed to get things done in a way it suppose to. If you are like me and if you keep getting unresolved externals errors on ThreadEmulation on windows 8.1. Just add the following code into your wwise integration class cpp file.

  #define AK_IMPLEMENT_THREAD_EMULATION
#include <AK/Tools/Win32/ThreadEmulation.h>


Note that it has to be before the #include your_wwise_Integration_class.h. 

answered Feb 23, 2016 by Yucel K. (180 points)
edited Feb 25, 2016 by Yucel K.
...