LNK2019 and LNK2001 linker errors when packaging

Hi All,

I am in desperate need of help and completely out of my depths but I would love some advice/actionable help if possible.

For context, I created a VR project on UE5 5.4.4 that I wanted to package (my first time packaging). It was a BP only project but due to my PCG plugin linking to c++, when packaging, it was treated as project with code. I had to then convert the project to c++ by creating an empty c++ class and then compiling using Visual Studio.

oh, and by the way, because I’m completly clueless (first time creating a game), and I’m no programmer, I had to direct my questions and search for solutions using ChatGPT.

Anyway, after doing the things detailed above, I tried to package, it failed of course and after copying the output log into GPT, it pointed out that it is a linker error (whatever that means):

I’m copying the output log below and have asked GPT to redact any sensitive data but I would be extremely grateful if somebody could help me get my project to a point where I can actutally package it as a game.

In case you may need this info, My Project is currently named Procedural, and my c++ class is named MyDummyClass.

UATHelper: Packaging (Windows): Running AutomationTool…
UATHelper: Packaging (Windows): Using bundled DotNet SDK version: 6.0.302
UATHelper: Packaging (Windows): Starting AutomationTool…
UATHelper: Packaging (Windows): Parsing command line: -ScriptsForProject=[REDACTED]/Procedural.uproject Turnkey -command=VerifySdk -platform=Win64 -UpdateIfNeeded -EditorIO -EditorIOPort=52189 -project=[REDACTED]/Procedural.uproject BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook -project=[REDACTED]/Procedural.uproject -target=Procedural -unrealexe=“C:\Program Files\Epic Games\UE_5.4\Engine\Binaries\Win64\UnrealEditor-Cmd.exe” -platform=Win64 -installed -stage -archive -package -build -pak -iostore -compressed -prereqs -archivedirectory=[REDACTED]/Packaged -clientconfig=Development -nocompile -nocompileuat
UATHelper: Packaging (Windows): Initializing script modules…
UATHelper: Packaging (Windows): Total script module initialization time: 0.18 s.
UATHelper: Packaging (Windows): Using MSBuild.exe
UATHelper: Packaging (Windows): Executing commands…
UATHelper: Packaging (Windows): Installed Sdk validity:
UATHelper: Packaging (Windows): Win64: (Status=Valid, MinAllowed_Sdk=10.0.18362.0, MaxAllowed_Sdk=10.9.99999.0, Current_Sdk=10.0.19041.0, Allowed_AutoSdk=10.0.19041.0, Current_AutoSdk=, Flags=“InstalledSdk_ValidVersionExists, Sdk_HasBestVersion”)
UATHelper: Packaging (Windows): Scanning for envvar changes…
UATHelper: Packaging (Windows): … done!
UATHelper: Packaging (Windows): Cleaning Temp Paths…
UATHelper: Packaging (Windows): BUILD SUCCESSFUL
UATHelper: Packaging (Windows): Setting up ProjectParams for [REDACTED]/Procedural.uproject
UATHelper: Packaging (Windows): ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Windows): Running: dotnet.exe UnrealBuildTool.dll Procedural Win64 Development -Project=[REDACTED]/Procedural.uproject -Manifest=[REDACTED]/Manifest.xml -remoteini=“[REDACTED]” -skipdeploy -log=“[REDACTED]/Logs/UBA-Procedural-Win64-Development.txt”
UATHelper: Packaging (Windows): Log file: [REDACTED]/Logs/UBA-Procedural-Win64-Development.txt
UATHelper: Packaging (Windows): Creating makefile for Procedural (no existing makefile)
UATHelper: Packaging (Windows): Parsing headers for Procedural
UATHelper: Packaging (Windows): Running Internal UnrealHeaderTool
UATHelper: Packaging (Windows): Total of 4 written
UATHelper: Packaging (Windows): Reflection code generated for Procedural in 1.0839 seconds
UATHelper: Packaging (Windows): Writing manifest to [REDACTED]/Manifest.xml
UATHelper: Packaging (Windows): Building Procedural…
UATHelper: Packaging (Windows): Using Visual Studio 2022 toolchain and Windows 10.0.19041.0 SDK
UATHelper: Packaging (Windows): [Upgrade]
UATHelper: Packaging (Windows): [Upgrade] Using backward-compatible include order.
UATHelper: Packaging (Windows): [Upgrade] IncludeOrderVersion = EngineIncludeOrderVersion.Oldest
UATHelper: Packaging (Windows): [Upgrade] Suppress this message by setting ‘IncludeOrderVersion = EngineIncludeOrderVersion.Latest;’ in Procedural.Target.cs.
UATHelper: Packaging (Windows): Determining max actions to execute in parallel (12 physical cores, 24 logical cores)
UATHelper: Packaging (Windows): Executing up to 12 processes
UATHelper: Packaging (Windows): Using Parallel executor to run 17 action(s)
UATHelper: Packaging (Windows): ------ Building 17 action(s) started ------
UATHelper: Packaging (Windows): [1/17] Copy tbb.dll
UATHelper: Packaging (Windows): [2/17] Copy D3D12Core.dll
UATHelper: Packaging (Windows): [3/17] Copy tbb12.dll
UATHelper: Packaging (Windows): [4/17] Copy tbbmalloc.pdb
UATHelper: Packaging (Windows): [5/17] Copy d3d12SDKLayers.dll
UATHelper: Packaging (Windows): [6/17] Copy OpenImageDenoise.dll
UATHelper: Packaging (Windows): [7/17] Copy tbbmalloc.dll
UATHelper: Packaging (Windows): [8/17] Copy tbb.pdb
UATHelper: Packaging (Windows): [9/17] Resource Default.rc2
UATHelper: Packaging (Windows): [10/17] Compile [x64] SharedPCH.Engine.Project.ValApi.Cpp20.InclOrderOldest.cpp
UATHelper: Packaging (Windows): [11/17] Compile [x64] Placeholder.cpp
UATHelper: Packaging (Windows): [12/17] Compile [x64] Procedural.cpp
UATHelper: Packaging (Windows): [13/17] Compile [x64] Procedural.init.gen.cpp
UATHelper: Packaging (Windows): [14/17] Compile [x64] MyDummyClass.cpp
UATHelper: Packaging (Windows): [15/17] Compile [x64] MyDummyClass.gen.cpp
UATHelper: Packaging (Windows): [16/17] Link [x64] Procedural.exe
UATHelper: Packaging (Windows): Creating library …\Procedural\Binaries\Win64\Procedural.lib and object …\Procedural\Binaries\Win64\Procedural.exp
UATHelper: Packaging (Windows): Module.TextureGraph.2.cpp.obj : error LNK2019: unresolved external symbol “public: class cti::continuable_base<class fu2::abi_400::detail::function<…>>” referenced in function “private: class cti::continuable_base<…> __cdecl UTG_AsyncRenderTask::GetRenderTextures(void)”
UATHelper: Packaging (Windows): Module.TextureGraph.2.cpp.obj : error LNK2001: unresolved external symbol “public: virtual class cti::continuable_base<…> __cdecl JobArg_TileInfo::Bind(struct JobArgBindInfo)”
UATHelper: Packaging (Windows): Module.TextureGraph.3.cpp.obj : error LNK2001: unresolved external symbol “public: virtual class cti::continuable_base<…> __cdecl JobArg_TileInfo::Bind(struct JobArgBindInfo)”
UATHelper: Packaging (Windows): Module.TextureGraph.2.cpp.obj : error LNK2001: unresolved external symbol “public: virtual class cti::continuable_base<…> __cdecl JobArg_TileInfo::Unbind(struct JobArgBindInfo)”
UATHelper: Packaging (Windows): Module.TextureGraph.3.cpp.obj : error LNK2001: unresolved external symbol “public: virtual class cti::continuable_base<…> __cdecl JobArg_TileInfo::Unbind(struct JobArgBindInfo)”
UATHelper: Packaging (Windows): Module.TextureGraph.3.cpp.obj : error LNK2019: unresolved external symbol “public: static class cti::continuable_base<…> __cdecl TextureExporter::ExportAsUAsset(class UMixInterface *,class FExportSettings const &,class FString)” referenced in function …
UATHelper: Packaging (Windows): [REDACTED_PATH]\Procedural.exe : fatal error LNK1120: 4 unresolved externals
UATHelper: Packaging (Windows): Total time in Parallel executor: 46.94 seconds
UATHelper: Packaging (Windows): Total execution time: 53.13 seconds
UATHelper: Packaging (Windows): Took 53.36s to run dotnet.exe, ExitCode=6
UATHelper: Packaging (Windows): UnrealBuildTool failed. See log for more details. ([REDACTED_PATH]\AutomationTool\Logs[REDACTED]\UBA-Procedural-Win64-Development.txt)
UATHelper: Packaging (Windows): AutomationTool executed for 0h 0m 55s
UATHelper: Packaging (Windows): AutomationTool exiting with ExitCode=6 (6)
UATHelper: Packaging (Windows): BUILD FAILED
PackagingResults: Error: Unknown Error

Thank you all in advance. Any help would go a long way.

Regards
Naeem

Hi,

Hope you’re doing well.

  1. Do you get any other error message during packing time? I suggest you try to pack and filter if you get any red error;

  2. Could you confirm you are using the right compiler version, which is 14.38 ? Maybe you are using >=14.43.

I believe the second item is the issue behind this packaging error.

Hope that helps, keep in touch - take care!

Hi @SpecZynk

Thanks for reaching out, much appreciated.

I checked my Visual Studio Installer > Modify > Individual components, and it seemed I had v143 v14.38-17.8 ticked as well as v143.38 (latest). I have now unticked the latest option.

Also to answer your other point, when packaging in UE5, I dont get any other error message in red.

Regards
Naeem

I see.

You’re welcome.

I think that’s the issue;

You just need one component, I mean the last preferred version 14.48 and the packing is going to work.

@SpecZynk unfortunately, this hasn’t helped. Still Seeing the LINK2001 & LINK2019 error.

What about the SDK?

Are you using Win10/11 (10.0.22621.0)?

Could you please share more detail about the linking error?

Where is this function located? Is it a plugin? (I don’t find this in my sources)

Most likely you just need to add the module in which the function declaration is located to the file Procedural.Build.cs

PrivateDependencyModuleNames.AddRange(new string[ ] { “NeededModuleName” });

Here is an example of defining a module name:

ProjectDir\Plugins\PluginName\Source\ NeededModuleName \Public\File.h

Hey @PREDALIEN

thanks for getting in touch.

I copied my output log into Copilot to see what it says, and it pointed out that these issues stem from the TextureGraph Plugin.

I checked the plugin section in UE5 and it is an experimental plugin and it advises not to use it in shipped projects. Is this related to the TextureExporter Line that you have queried?

I disabled this plugin hoping it would help but now I have build Issues on Visual Studio (might be unrelated because I was messing around with VS Installer); I’m not exactly sure what the best VS config is for UE5.

The build error description is the following: The type or namespace name ‘UnrealBuildTool’ could not be found (are you missing a using directive or an assembly reference? I’ve had many succesful builds and this is the first time this has showed.

Regarding the TextureExporter - I can’t find it anywhere as well

What would you recommend?

Apparently I don’t have it…

Don’t pay too much attention to it…
Many things in Unreal have been working for many years, do not change, but are considered experimental. :sweat_smile:

Oops, my attentiveness seems to be failing me again. I thought that was the original problem…

If the project initially builds successfully in VS, but there is a failure during packaging - then most likely you are referencing from the runtime module to the editor module, which is not added when packaging the project (it should not be there). :thinking:

That is, you are trying to use a feature that is only intended while you are working with the project, but not when you are playing it.