Description

I was able to encounter these errors on the latest binary for 4.25.3 when doing a repro for a salesforce ticket. Here is the customers description:

When importing the C++ ThirdPersonCharacter package in a C++ Unreal project, I encounter a Linker error (LNK2019: unresolved external symbol) immediately upon recompile, with all ThirdPersonCharacter source files not showing up in the Source folders of the content browser. When taking a look at the directories in Explorer/Visual Studio, I noticed that the .cpp and .h files are there, however there is no .cs Build file for the TP_ThirdPerson module. This is entirely OOTB on a blank project as well - I have not made any engine modifications, nor have I done anything other than save a Map and create a couple of unrelated child classes in C++ in this project. This is not specific to just my current project, either - it happens consistently every time I import the package on any project.

Here are the errors:

CompilerResultsLog: Error:   TP_ThirdPersonCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl UHeadMountedDisplayFunctionLibrary::ResetOrientationAndPosition(float,enum EOrientPositionSelector::Type)" (__imp_?ResetOrientationAndPosition@UHeadMountedDisplayFunctionLibrary@@SAXMW4Type@EOrientPositio
nSelector@@@Z) referenced in function "protected: void __cdecl ATP_ThirdPersonCharacter::OnResetVR(void)" (?OnResetVR@ATP_ThirdPersonCharacter@@IEAAXXZ)
CompilerResultsLog: Error:   C:\Users\corey\Documents\Unreal Projects\MyProject\Binaries\Win64\UE4Editor-MyProject-1173.dll : fatal error LNK1120: 1 unresolved externals 
Steps to Reproduce
  1. Create Blank C++ project
  2. Add New -> Add feature or content pack -> C++ Third Person
  3. Click yes on prompt that reads "Added source file(s). Would you like to edit the code now?"
  4. After compile, observe errors

Expected: Compile finishes successfully

Result: Compiler errors, error LNK2019: unresolved external symbol

Callstack
Launching UnrealBuildTool... [C:/Program Files/Epic Games/UE_4.25/Engine/Binaries/DotNET/UnrealBuildTool.exe  -ModuleWithSuffix=MyProject,1173 MyProjectEditor Win64 Development -Project="C:/Users/corey/Documents/Unreal Projects/MyProject/MyProject.uproject" "C:/Users/corey/Documents/Unreal Projects/MyProject/MyProject.uproject"  -IgnoreJunk]
CompilerResultsLog: New page: Compilation - Oct 19, 2020, 5:35:08 AM
CompilerResultsLog: Creating makefile for MyProjectEditor (no existing makefile)
CompilerResultsLog: Parsing headers for MyProjectEditor
CompilerResultsLog:   Running UnrealHeaderTool "C:\Users\corey\Documents\Unreal Projects\MyProject\MyProject.uproject" "C:\Users\corey\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\MyProjectEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -abslog="C:\Us
ers\corey\AppData\Local\UnrealBuildTool\Log_UHT.txt" -installed
CompilerResultsLog: Reflection code generated for MyProjectEditor in 4.7927288 seconds
CompilerResultsLog: Building MyProjectEditor...
CompilerResultsLog: Using Visual Studio 2019 14.25.28614 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
CompilerResultsLog: Building 8 actions with 8 processes...
CompilerResultsLog:   [1/8] MyProject.init.gen.cpp
CompilerResultsLog:   [2/8] TP_ThirdPersonCharacter.gen.cpp
CompilerResultsLog:   [3/8] TP_ThirdPersonGameMode.gen.cpp
CompilerResultsLog:   [4/8] TP_ThirdPersonGameMode.cpp
CompilerResultsLog:   [5/8] TP_ThirdPersonCharacter.cpp
CompilerResultsLog:   [6/8] UE4Editor-MyProject-1173.lib
CompilerResultsLog:      Creating library C:\Users\corey\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\UE4Editor\Development\MyProject\UE4Editor-MyProject-1173.lib and object C:\Users\corey\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\UE4Editor\Development\MyProject\UE4Editor-MyProject-1173.exp
CompilerResultsLog:   [7/8] UE4Editor-MyProject-1173.dll
CompilerResultsLog:      Creating library C:\Users\corey\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\UE4Editor\Development\MyProject\UE4Editor-MyProject-1173.suppressed.lib and object C:\Users\corey\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\UE4Editor\Development\MyProject\UE4Editor-MyProject-1173.suppressed.exp
CompilerResultsLog: Error:   TP_ThirdPersonCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl UHeadMountedDisplayFunctionLibrary::ResetOrientationAndPosition(float,enum EOrientPositionSelector::Type)" (__imp_?ResetOrientationAndPosition@UHeadMountedDisplayFunctionLibrary@@SAXMW4Type@EOrientPositio
nSelector@@@Z) referenced in function "protected: void __cdecl ATP_ThirdPersonCharacter::OnResetVR(void)" (?OnResetVR@ATP_ThirdPersonCharacter@@IEAAXXZ)
CompilerResultsLog: Error:   C:\Users\corey\Documents\Unreal Projects\MyProject\Binaries\Win64\UE4Editor-MyProject-1173.dll : fatal error LNK1120: 1 unresolved externals 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-101331 in the post.

0
Login to Vote

Fixed
ComponentUE - Platform - XR
Affects Versions4.25.34.26
Target Fix4.26
Fix Commit14602502
Release Commit14602502
CreatedOct 19, 2020
ResolvedOct 28, 2020
UpdatedApr 27, 2021
View Jira Issue