在 Audiokinetic 社区问答论坛上,用户可对 Wwise 和 Strata 相关问题进行提问和解答。如需从 Audiokinetic 技术支持团队获取答复,请务必使用技术支持申请单页面。

UE4 - LNK2001 and LNK2019

0 投票

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)
    最新提问 4月 5, 2019 分类:General Discussion | 用户: Jonathan P. (500 分)

    1个回答

    0 投票

    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!

    最新回答 11月 19, 2019 用户: Ed K. (300 分)
    ...