I have found that packaging C++ plugins can be difficult
There are some forum posts with questions similar to mine, but they have not led to a solution, so starting a new thread. As the title says, my plugin builds fine in Visual Studio, runs fine in the parent project, but I cannot get it packaged.
I have fixed all of the build errors that called out my own code, by adding the necessary header includes and module references in the Build.cs file. All that remains is a litany of engine header errors that I canβt decipher. Here are a few of the errors, with the build log attached below.
UATHelper: Package Plugin Task (Windows): [2/5] Compile [x64] AcceptClientsRunnable.cpp
UATHelper: Package Plugin Task (Windows): C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\GenericPlatform\GenericPlatformProcess.h(800): error C2062: type 'void' unexpected
UATHelper: Package Plugin Task (Windows): C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\GenericPlatform\GenericPlatformProcess.h(801): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
UATHelper: Package Plugin Task (Windows): C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\Containers\LockFreeList.h(203): error C2039: '_InterlockedCompareExchange': is not a member of 'FWindowsPlatformAtomics'
UATHelper: Package Plugin Task (Windows): C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\Windows\WindowsPlatformAtomics.h(13): note: see declaration of 'FWindowsPlatformAtomics'
UATHelper: Package Plugin Task (Windows): C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\Containers\LockFreeList.h(203): error C2660: 'FIndexedPointer::_InterlockedCompareExchange': function does not take 3 arguments
UATHelper: Package Plugin Task (Windows): C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\Containers\LockFreeList.h(200): note: see declaration of 'FIndexedPointer::_InterlockedCompareExchange'
UATHelper: Package Plugin Task (Windows): C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\Containers\LockFreeList.h(203): note: while trying to match the argument list '(volatile int64 *, const uint64, const uint64)'
UATHelper: Package Plugin Task (Windows): C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\Stats\Stats2.h(1374): error C2039: '__faststorefence': is not a member of 'FWindowsPlatformMisc'
UATHelper: Package Plugin Task (Windows): C:\Program Files\Epic Games\UE_5.4\Engine\Source\Runtime\Core\Public\Windows\WindowsPlatformMisc.h(96): note: see declaration of 'FWindowsPlatformMisc'
UBA-UnrealGame-Win64-Development.txt (93.8 KB)
The plugin creates a Bluetooth listen server thread. Clients that connect get their own data thread that parses any received data (JSON) and passes that data along to Blueprint through an event. So there is some marshalling of data between threads as well as interaction with the external WinSock2 library from within threads.
If anyone has some thoughts it would be greatly appreciated. This thing is driving me crazy!
Specs: Windows, UE 5.4.4