x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

UELinkerFixups.cpp.obj : error LNK2019 linking simple BP uproject with simple c++ class added (only from build UE4.19.1 LocalBuild)

I have a simple default BP Third Person uproject with a simple C++ class added, and no changes to anything in the generated project files.

I use UAT to build from command line from either source-built UE4.19.1 localbuild (in source control) or from installed/retail UE4.19.1. My scripts can switch, as appropriate.

Building with the source-built localbuild results in the following linker error, but building with the installed/retail build does not.

I'm digging, but could use some guidance as to the cause here.

  • thanks

Running: D:\TestRoot\Projects\Tools\UE4\Engine\Binaries\DotNET\UnrealBuildTool.exe TestBuild2 Win64 Development -Project=D:\TestRoot\Projects\Projects\TestBuild2\Game\TestBuild2.uproject D:\TestRoot\Projects\Projects\TestBuild2\Game\TestBuild2.uproject -NoUBTMakefiles -remoteini="D:\TestRoot\Projects\Projects\TestBuild2\Game" -noxge -NoHotReload -ignorejunk Performing 2 actions (16 in parallel) UELinkerFixups.cpp [2/2] Link TestBuild2.exe Creating library D:\TestRoot\Projects\Projects\TestBuild2\Game\Binaries\Win64\TestBuild2.lib and object D:\TestRoot\Projects\Projects\TestBuild2\Game\Binaries\Win64\TestBuild2.exp UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodeuicommandinfo(void)" (?EmptyLinkFunctionForGeneratedCodeuicommandinfo@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodedestructibleinterface(void)" (?EmptyLinkFunctionForGeneratedCodedestructibleinterface@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodesoundsourcebus(void)" (?EmptyLinkFunctionForGeneratedCodesoundsourcebus@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodesoundsourcebussend(void)" (?EmptyLinkFunctionForGeneratedCodesoundsourcebussend@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodetimestretchcurve(void)" (?EmptyLinkFunctionForGeneratedCodetimestretchcurve@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodemediablueprintfunctionlibrary(void)" (?EmptyLinkFunctionForGeneratedCodemediablueprintfunctionlibrary@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodemediasoundcomponent(void)" (?EmptyLinkFunctionForGeneratedCodemediasoundcomponent@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodeiosruntimesettings(void)" (?EmptyLinkFunctionForGeneratedCodeiosruntimesettings@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodeiosruntimesettings_init(void)" (?EmptyLinkFunctionForGeneratedCodeiosruntimesettings_init@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodelivelinkinterface_init(void)" (?EmptyLinkFunctionForGeneratedCodelivelinkinterface_init@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodelivelinkrefskeleton(void)" (?EmptyLinkFunctionForGeneratedCodelivelinkrefskeleton@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodelivelinksourcefactory(void)" (?EmptyLinkFunctionForGeneratedCodelivelinksourcefactory@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodelivelinktypes(void)" (?EmptyLinkFunctionForGeneratedCodelivelinktypes@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodelivelinkmessagebusframework_init(void)" (?EmptyLinkFunctionForGeneratedCodelivelinkmessagebusframework_init@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForGeneratedCodelivelinkmessages(void)" (?EmptyLinkFunctionForGeneratedCodelivelinkmessages@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ) UE4-AkAudio.lib(Module.AkAudio.cpp.obj) : error LNK2019: unresolved external symbol "public: class std::basic_string,class std::allocator > __cdecl AK::WwiseAuthoringAPI::JsonProvider::GetJsonString(void)const " (?GetJsonString@JsonProvider@WwiseAuthoringAPI@AK@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "void __cdecl WampEventCallbacks(unsigned __int64 const &,class AK::WwiseAuthoringAPI::JsonProvider const &)" (?WampEventCallbacks@@YAXAEB_KAEBVJsonProvider@WwiseAuthoringAPI@AK@@@Z) UE4-AkAudio.lib(Module.AkAudio.cpp.obj) : error LNK2019: unresolved external symbol "public: __cdecl AK::WwiseAuthoringAPI::Client::Client(void)" (??0Client@WwiseAuthoringAPI@AK@@QEAA@XZ) referenced in function "private: __cdecl FAkWaapiClient::FAkWaapiClient(void)" (??0FAkWaapiClient@@AEAA@XZ) UE4-AkAudio.lib(Module.AkAudio.cpp.obj) : error LNK2019: unresolved external symbol "public: virtual __cdecl AK::WwiseAuthoringAPI::Client::~Client(void)" (??1Client@WwiseAuthoringAPI@AK@@UEAA@XZ) referenced in function "public: virtual __cdecl FAkWaapiClient::~FAkWaapiClient(void)" (??1FAkWaapiClient@@UEAA@XZ) UE4-AkAudio.lib(Module.AkAudio.cpp.obj) : error LNK2019: unresolved external symbol "public: bool __cdecl AK::WwiseAuthoringAPI::Client::Connect(char const ,unsigned int)" (?Connect@Client@WwiseAuthoringAPI@AK@@QEAA_NPEBDI@Z) referenced in function "public: bool __cdecl FAkWaapiClient::AttemptConnection(void)" (?AttemptConnection@FAkWaapiClient@@QEAA_NXZ) UE4-AkAudio.lib(Module.AkAudio.cpp.obj) : error LNK2019: unresolved external symbol "public: bool __cdecl AK::WwiseAuthoringAPI::Client::IsConnected(void)const " (?IsConnected@Client@WwiseAuthoringAPI@AK@@QEBA_NXZ) referenced in function "public: bool __cdecl FAkWaapiClient::IsConnected(void)" (?IsConnected@FAkWaapiClient@@QEAA_NXZ) UE4-AkAudio.lib(Module.AkAudio.cpp.obj) : error LNK2019: unresolved external symbol "public: void __cdecl AK::WwiseAuthoringAPI::Client::Disconnect(void)" (?Disconnect@Client@WwiseAuthoringAPI@AK@@QEAAXXZ) referenced in function "public: void __cdecl ::operator()(void)const " (??R@@QEBAXXZ) UE4-AkAudio.lib(Module.AkAudio.cpp.obj) : error LNK2019: unresolved external symbol "public: bool __cdecl AK::WwiseAuthoringAPI::Client::Subscribe(char const ,char const ,class std::function,unsigned __int64 &,class std::basic_string,class std::allocator > &,int)" (?Subscribe@Client@WwiseAuthoringAPI@AK@@QEAA_NPEBD0V?$function@$$A6AX_KAEBVJsonProvider@WwiseAuthoringAPI@AK@@@Z@std@@AEA_KAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@5@H@Z) referenced in function "public: bool __cdecl FAkWaapiClient::Subscribe(char const ,class FString const &,class TBaseDelegate >,unsigned __int64 &,class FString &,int)" (?Subscribe@FAkWaapiClient@@QEAA_NPEBDAEBVFString@@V?$TBaseDelegate@X_KV?$TSharedPtr@VFJsonObject@@$0A@@@@@AEA_KAEAV2@H@Z) UE4-AkAudio.lib(Module.AkAudio.cpp.obj) : error LNK2019: unresolved external symbol "public: bool __cdecl AK::WwiseAuthoringAPI::Client::Unsubscribe(unsigned __int64 const &,class std::basic_string,class std::allocator > &,int)" (?Unsubscribe@Client@WwiseAuthoringAPI@AK@@QEAA_NAEB_KAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function "public: bool __cdecl FAkWaapiClient::Unsubscribe(unsigned __int64 const &,class FString &,int,bool)" (?Unsubscribe@FAkWaapiClient@@QEAA_NAEB_KAEAVFString@@H_N@Z) UE4-AkAudio.lib(Module.AkAudio.cpp.obj) : error LNK2019: unresolved external symbol "public: bool __cdecl AK::WwiseAuthoringAPI::Client::Call(char const ,char const ,char const ,class std::basic_string,class std::allocator > &,int)" (?Call@Client@WwiseAuthoringAPI@AK@@QEAA_NPEBD00AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function "public: bool __cdecl FAkWaapiClient::Call(char const ,class FString const &,class FString const &,class FString &,int,bool)" (?Call@FAkWaapiClient@@QEAA_NPEBDAEBVFString@@1AEAV2@H_N@Z) D:\TestRoot\Projects\Projects\TestBuild2\Game\Binaries\Win64\TestBuild2.exe : fatal error LNK1120: 24 unresolved externals ERROR: UBT ERROR: Failed to produce item: D:\TestRoot\Projects\Projects\TestBuild2\Game\Binaries\Win64\TestBuild2.exe Total build time: 13.04 seconds (Local executor: 0.00 seconds) Took 13.3473558s to run UnrealBuildTool.exe, ExitCode=5

So, taking the case of a slate export signature, I've confirmed that the linker appears to be pulling in the right libs...**

D:\TestRoot\Projects\Tools\UE4\Engine\Binaries\Win64>findstr /ismc:"?EmptyLinkFunctionForGeneratedCodeuicommandinfo@@YAXXZ" .lib .dll UE4-Slate-Win64-Shipping.lib UE4-Slate.lib

D:\TestRoot\Projects\Tools\UE4\Engine\Binaries\Win64>link /dump /all UE4-Slate-Win64-Shipping.lib | findstr /ic:"EmptyLinkFunctionForGeneratedCodeuicommandinfo" 204162 ?EmptyLinkFunctionForGeneratedCodeUICommandInfo@@YAXXZ 2 ?EmptyLinkFunctionForGeneratedCodeUICommandInfo@@YAXXZ COMDAT; sym= "void __cdecl EmptyLinkFunctionForGeneratedCodeUICommandInfo(void)" (?EmptyLinkFunctionForGeneratedCodeUICommandInfo@@YAXXZ) 72F 00000000 SECT119 notype () External | ?EmptyLinkFunctionForGeneratedCodeUICommandInfo@@YAXXZ (void __cdecl EmptyLinkFunctionForGeneratedCodeUICommandInfo(void))

???

Product Version: UE 4.19
Tags:
more ▼

asked Apr 23 '18 at 01:01 PM in Packaging & Deployment

avatar image

Paul.Bronowski
6 1 1

avatar image Paul.Bronowski Apr 21 '18 at 01:25 AM

I've confirmed that link.exe is getting the same params in our Projects\TestBuild2\Game\Intermediate\Build\Win64\TestBuild2\Development\TestBuild2.exe.response

The problem has to be either in the generated project .obj's or in the ue4 .libs built from source.

???

avatar image Paul.Bronowski Apr 21 '18 at 01:49 AM

I discovered a casing problem in the generated uelinkerfixups.cpp in the failing build. Snippet of windiff output (failing build lines are every second line)...

 extern void EmptyLinkFunctionForGeneratedCodeLiveLinkInterface_init();
 extern void EmptyLinkFunctionForGeneratedCodelivelinkinterface_init();

 EmptyLinkFunctionForGeneratedCodeLiveLinkInterface_init();
 EmptyLinkFunctionForGeneratedCodelivelinkinterface_init();

 extern void EmptyLinkFunctionForGeneratedCodeLiveLinkRefSkeleton();
 extern void EmptyLinkFunctionForGeneratedCodelivelinkrefskeleton();

 EmptyLinkFunctionForGeneratedCodeLiveLinkRefSkeleton();
 EmptyLinkFunctionForGeneratedCodelivelinkrefskeleton();

 extern void EmptyLinkFunctionForGeneratedCodeLiveLinkSourceFactory();
 extern void EmptyLinkFunctionForGeneratedCodelivelinksourcefactory();

 EmptyLinkFunctionForGeneratedCodeLiveLinkSourceFactory();
 EmptyLinkFunctionForGeneratedCodelivelinksourcefactory();


 extern void EmptyLinkFunctionForGeneratedCodeLiveLinkTypes();
 extern void EmptyLinkFunctionForGeneratedCodelivelinktypes();

 EmptyLinkFunctionForGeneratedCodeLiveLinkTypes();
 EmptyLinkFunctionForGeneratedCodelivelinktypes();

 extern void EmptyLinkFunctionForGeneratedCodeLiveLinkMessageBusFramework_init();
 extern void EmptyLinkFunctionForGeneratedCodelivelinkmessagebusframework_init();

 EmptyLinkFunctionForGeneratedCodeLiveLinkMessageBusFramework_init();
 EmptyLinkFunctionForGeneratedCodelivelinkmessagebusframework_init();

 extern void EmptyLinkFunctionForGeneratedCodeLiveLinkMessages();
 extern void EmptyLinkFunctionForGeneratedCodelivelinkmessages();

 EmptyLinkFunctionForGeneratedCodeLiveLinkMessages();
 EmptyLinkFunctionForGeneratedCodelivelinkmessages();

This feels like a bug.

avatar image Paul.Bronowski Apr 21 '18 at 02:19 AM

Here's the code that builds the linker response file...

Tools\UE4\Engine\Source>findstr /s EmptyLinkFunctionForGeneratedCode .cs .c .cpp .h Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs: string FunctionName = "EmptyLinkFunctionForGeneratedCode" + Path.GetFileName(CppFile).Replace(".gen.cpp", "").Replace(".", "_"); Programs\UnrealBuildTool\Platform\Android\AndroidToolChain.cs: Result.Add(" void EmptyLinkFunctionForGeneratedCode" + ModName + "(){}"); Programs\UnrealHeaderTool\Private\CodeGenerator.cpp: Out.Logf(TEXT("void EmptyLinkFunctionForGeneratedCode%s() {}") LINE_TERMINATOR, EmptyLinkFunctionPostfix);

Sure enough, we have a lower-cased files in source control...

Tools\UE4\Engine\Intermediate\Build\Win64\UE4\Inc\LiveLinkInterface\livelinkinterface.init.gen.cpp Tools\UE4\Engine\Intermediate\Build\Win64\UE4\Inc\LiveLinkInterface\livelinkinterfaceclasses.h

Trying to track down if the UE4 source build did that or P4.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Looks like it was Perforce that probably caused the case problem as several subtrees were entirely lowercased in one copy of UE4 LocalBuild in source control, but not another. Both were populated with robocopy /MIR. Very odd. One possible factor is that our Helix server/clients is/are configured with the default, case-insensitive, setting (which we'll flip)...

 Server case handling: insensitive
 clientCase: insensitive

So, there's still some fragility here in the UE4 build system that's worth noting: If you see linker errors related to UELinkerFixups.cpp.obj, consider this filename case problem and look at re-generating your UE4 Engine intermediates or project intermediates as a possible remedy.

  • thanks

more ▼

answered Apr 23 '18 at 08:29 PM

avatar image

Paul.Bronowski
6 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question