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.

UE4 - LNK2001 and LNK2019

0 votes

All calls to Wwise's sound engine are made from an AkAudioDevice class in the UE4 integration. As we are looking to avoid modifying the stock integrations for reasons of portability, we are looking to send calls to Wwise in our own classes (without touching your 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 AkAudioDevice. Is there any way to make this possible, so that we can avoid modifying AkAudioDevice and keep our code between integration versions?

  1. 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)
  2. 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)
  3. 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)
  4. AkMemoryMgr.lib(AkMemoryMgrBase.obj) : error LNK2001: unresolved external symbol "void * __cdecl AK::AllocHook(unsigned __int64)" (?AllocHook@AK@@YAPEAX_K@Z)
  5. 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)
  6. AkMemoryMgr.lib(AkMemoryMgrBase.obj) : error LNK2001: unresolved external symbol "void __cdecl AK::FreeHook(void *)" (?FreeHook@AK@@YAXPEAX@Z)
    asked Apr 5, 2019 in General Discussion by Jonathan P. (500 points)

    1 Answer

    0 votes

    Hello! I had a similar problem. Wwise requires to declare AllocHook, FreeHook and VirtualFreeHook functions manually in every project. I don't know why but it is. Details and the body of functions here: https://www.audiokinetic.com/library/edge/?source=SDK&id=workingwithsdks_initialization.html 

    I hope it helps!

    answered Nov 19, 2019 by Ed K. (300 points)
    ...