[UE5.5] Error using clang on Windows for Console command

EsmeraldaQuinter
Mon, 31 Mar 2025 23:26:18 +0000
Programming & Scripting

Hello!

I’m creating a plugin that provides some cmd commands.
I registered the command using IConsoleManager::Get().RegisterConsoleCommand and FConsoleCommandWithArgsDelegate::CreateStatic.
It works ok using MSVC compiler, but when using CLANG compiler it triggers some errors such as:

lld-link : error : undefined symbol: __declspec(dllimport) unsigned long __cdecl Windows::GetCurrentThreadId(void)
undefined symbol: __declspec(dllimport) void __cdecl Windows::EnterCriticalSection(struct _RTL_CRITICAL_SECTION *)

How can I address the issue?
It is invalid to use FConsoleCommandWithArgsDelegate when using clang?

1 post - 1 participant