Error LNK2001 and LNK2019 while customizing Wwise integration

Hey there,

This is not necessarily a Wwise-specific issue, but I believe it is more of a general module question.

All calls to Wwise’s sound engine are made from an AkAudioDevice class in their integration. As we are looking to avoid modifying the stock integrations for portability, we are looking to send calls to Wwise in our own classes (without touching their integration code).

However, it seems that calling any function to Wwise outside of AkAudioDevice gives me linking errors LNK2001/LNK2019. I’d really like to be able to communicate with the sound engine directly without using their AkAudioDevice, but I’m in a little over my head.

This is all the Wwise documentation says on the issue: UE4 C++ projects

Here’s what I’m getting when I try to call anything to Wwise without going through the AkAudioDevice…

  AkMemoryMgr.lib(AkMemoryMgr.obj) : error LNK2019: unresolved external symbol "void * __cdecl AK::VirtualAllocHook(void *,unsigned __int64,unsigned long,unsigned long)" (?VirtualAllocHook@AK@@YAPEAXPEAX_KKK@Z) referenced in function "long __cdecl AK::MemoryMgr::CreatePool(void *,unsigned long,unsigned long,unsigned long,unsigned long)" (?CreatePool@MemoryMgr@AK@@YAJPEAXKKKK@Z)
  AkMemoryMgr.lib(AkMemoryMgr.obj) : error LNK2019: unresolved external symbol "void __cdecl AK::VirtualFreeHook(void *,unsigned __int64,unsigned long)" (?VirtualFreeHook@AK@@YAXPEAX_KK@Z) referenced in function "void __cdecl AK::MemoryMgr::DeallocatePool(struct AkMemPool &)" (?DeallocatePool@MemoryMgr@AK@@YAXAEAUAkMemPool@@@Z)
  AkMemoryMgr.lib(AkMemoryMgr.obj) : error LNK2019: unresolved external symbol "void * __cdecl AK::AllocHook(unsigned __int64)" (?AllocHook@AK@@YAPEAX_K@Z) referenced in function "long __cdecl AK::MemoryMgr::CreatePool(void *,unsigned long,unsigned long,unsigned long,unsigned long)" (?CreatePool@MemoryMgr@AK@@YAJPEAXKKKK@Z)
  AkMemoryMgr.lib(AkMemoryMgrBase.obj) : error LNK2001: unresolved external symbol "void * __cdecl AK::AllocHook(unsigned __int64)" (?AllocHook@AK@@YAPEAX_K@Z)
  AkMemoryMgr.lib(AkMemoryMgr.obj) : error LNK2019: unresolved external symbol "void __cdecl AK::FreeHook(void *)" (?FreeHook@AK@@YAXPEAX@Z) referenced in function "void __cdecl AK::MemoryMgr::DeallocatePool(struct AkMemPool &)" (?DeallocatePool@MemoryMgr@AK@@YAXAEAUAkMemPool@@@Z)
  AkMemoryMgr.lib(AkMemoryMgrBase.obj) : error LNK2001: unresolved external symbol "void __cdecl AK::FreeHook(void *)" (?FreeHook@AK@@YAXPEAX@Z)

Hello,

It’s because once you link to Wwise libs, ie write code that includes and makes use of their classes and functions, you need to manually define those functions.

More info here.

Hope this helps!