Please be advised that the Audiokinetic offices will close at 3:00 p.m. EST on December 23rd, 2019 for the holiday period, and will reopen on January 3rd, 2020 at 9:00 a.m. EST. Learn more.

Community Q&A

Where Wwise users help each other out!

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

AK::SoundEngine::Suspend() in UE4.19 doesn't compile with LNK error

0 votes
Wwise plugin info "Version" : 201720933, "VersionName" : "2017.2.4.6590.933", "EngineVersion" : "4.19.0"

I am trying to use Suspend(bool) and WakeupFromSuspend() in UE4 but I have link error on methods I'm not even using. I guess I missed something.

I put AKAdio in the build.cs

In my cpp:

#include <AK/SoundEngine/Common/AkSoundEngine.h>

uint8 UMiscBlueprintFunctionLibrary::MuteWwise(bool mute)
{
    AKRESULT result = AKRESULT::AK_Fail;
    if (mute)
        AK::SoundEngine::Suspend(false);
    else
        result = AKRESULT::AK_Fail; //AK::SoundEngine::WakeupFromSuspend();
    return uint8(result);
}

 

The compilation error I get :

1>AkMemoryMgr.lib(AkMemoryMgrBase.obj) : error LNK2019: symbole externe non rÚsolu "void * __cdecl AK::AllocHook(unsigned __int64)" (?AllocHook@AK@@YAPEAX_K@Z) rÚfÚrencÚ dans la fonction "enum AKRESULT __cdecl AK::MemoryMgr::InitBase(long,unsigned long)" (?InitBase@MemoryMgr@AK@@YA?AW4AKRESULT@@JK@Z)
1>AkMemoryMgr.lib(AkMemoryMgr.obj) : error LNK2001: symbole externe non rÚsolu "void * __cdecl AK::AllocHook(unsigned __int64)" (?AllocHook@AK@@YAPEAX_K@Z)
1>AkMemoryMgr.lib(AkMemoryMgrBase.obj) : error LNK2019: symbole externe non rÚsolu "void __cdecl AK::FreeHook(void *)" (?FreeHook@AK@@YAXPEAX@Z) rÚfÚrencÚ dans la fonction "void __cdecl AK::MemoryMgr::Term(void)" (?Term@MemoryMgr@AK@@YAXXZ)
1>AkMemoryMgr.lib(AkMemoryMgr.obj) : error LNK2001: symbole externe non rÚsolu "void __cdecl AK::FreeHook(void *)" (?FreeHook@AK@@YAXPEAX@Z)
1>AkMemoryMgr.lib(AkMemoryMgr.obj) : error LNK2019: symbole externe non rÚsolu "void * __cdecl AK::VirtualAllocHook(void *,unsigned __int64,unsigned long,unsigned long)" (?VirtualAllocHook@AK@@YAPEAXPEAX_KKK@Z) rÚfÚrencÚ dans la fonction "long __cdecl AK::MemoryMgr::CreatePool(void *,unsigned long,unsigned long,unsigned long,unsigned long)" (?CreatePool@MemoryMgr@AK@@YAJPEAXKKKK@Z)
1>AkMemoryMgr.lib(AkMemoryMgr.obj) : error LNK2019: symbole externe non rÚsolu "void __cdecl AK::VirtualFreeHook(void *,unsigned __int64,unsigned long)" (?VirtualFreeHook@AK@@YAXPEAX_KK@Z) rÚfÚrencÚ dans la fonction "long __cdecl AK::MemoryMgr::CreatePool(void *,unsigned long,unsigned long,unsigned long,unsigned long)" (?CreatePool@MemoryMgr@AK@@YAJPEAXKKKK@Z)
1>D:\UE4 Projects\PerforceProjects\VrEscapeGame419\Binaries\Win64\UE4Editor-ProjetExempleVr.dll : fatal error LNK1120: 4 externes non rÚsolus

As soon as I comment the method call my project compile juste fine, even the AKRESULT enum doesn't throw error.

 

What did I do wrong and where do these errors come from ?

How can I effectively cal this "suspend" method in my UE4 project ?
asked Jun 21 in General Discussion by AURELIEN G. (100 points)

1 Answer

0 votes
read the error message carefully.

AK::AllocHook(unsigned __int64) and friends are missing because *you* are supposed to provide them.

for each missing symbol define and implement it and link.exe will find and use them.

hope that helps.
answered Jul 3 by Dan M. (2,660 points)
...