I make a simple function in c++ created from the UE4 Project:
‘‘Add new c++ class>NewFunctionBlueprintLibrary’’ like this:
Adding a simple code into it following a lot of tutorials like this:
.h FILE
.cpp FILE
And i always get an error ‘‘1 unresolved externals’’
i make all the stuff in the right way and also i tried to copy and paste codes from other tutorials but it simple dosnt works for me.
(Im using visual studio 2019 and i choose ‘‘visual studio 2019’’ in the editor preferences)
Tutorials references:
https://nerivec.github.io/old-ue4-wiki/pages/blueprint-function-library-create-your-own-to-share-with-others.html
Hey gang,
Completely baffled as to why adding a UFUNCTION() to a .h function signature causes it to trigger an unresolved external symbol error on compile:
Creating library C:\UnrealProjects\FromBeyond\NeonDrift\Intermediate/Build/Win64\UE4Editor\DebugGame\UE4Editor-NeonDrift-Win64-DebugGame.lib and object C:\UnrealProjects\FromBeyond\NeonDrift\Intermediate/Build/Win64\UE4Editor\DebugGame\UE4Editor-NeonDrift-Win64-DebugGame.exp
2>Pawn_DefaultCar.cpp.obj : error LNK2019: unresolved external s…
STRiFE.x
(STRiFE)
June 3, 2021, 9:05pm
2
According to the docs: “… Methods in subclasses are expected to be static, and no methods should be added to this base class.” Try making the function static.
OMG it working now finally, im so happy now thankyou @STRiFE.x @anonymous_user_3867756a for your help!
I’ll put the final result
.h
.cpp
final result
1 Like