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"

error LINK2019: unresolved external symbol when packaging, not when compiling

Greetings, I'm not sure why I'm getting these errors when building. The game code compiles correctly and runs good in editor, but when I try packaging, I get these error messages:

 VRPawn.cpp.obj : error LNK2019: unresolved external symbol "public: short * __cdecl AVRPlayerController::GetFingerData(void)" (?GetFingerData@AVRPlayerController@@QEAAPEAFXZ) referenced in function "public: virtual void __cdecl AVRPawn::Tick(float)" (?Tick@AVRPawn@@UEAAXM@Z)
 VRPawn.cpp.obj : error LNK2019: unresolved external symbol "public: float * __cdecl AVRPlayerController::GetGyroData(void)" (?GetGyroData@AVRPlayerController@@QEAAPEAMXZ) referenced in function "public: virtual void __cdecl AVRPawn::Tick(float)" (?Tick@AVRPawn@@UEAAXM@Z)
 error LNK2019: unresolved external symbol "public: class FSerialPortHandler * __cdecl AVRPlayerController::GetSerialPort(void)" (?GetSerialPort@AVRPlayerController@@QEAAPEAVFSerialPortHandler@@XZ) referenced in function "public: virtual void __cdecl AVRPawn::Tick(float)" (?Tick@AVRPawn@@UEAAXM@Z)

In the Pawn class I'm trying to get a pointer to an array from the Controller class

 //Controller class functions to get data
 int16_t* AVRPlayerController::GetFingerData()
 {
     return this->FingerData;
 }
 float* AVRPlayerController::GetGyroData()
 {
     return this->GyroData;
 }
 // Return pointer to FSerialPortHandler object
 FSerialPortHandler* AVRPlayerController::GetSerialPort()
 {
     return Teensy;
 }

Then again trying to get the data in the Pawn class

 ThisController = Cast<AVRPlayerController>(GetController());
 FingerData = ThisController->GetFingerData();
 GyroData = ThisController->GetGyroData();

where all variables are of the required type. As stated above, everything compiles and runs correctly. I would appreciate if somebody could help me, why the game won't build.

Product Version: UE 4.15
Tags:
more ▼

asked Nov 11 '17 at 10:29 PM in Packaging & Deployment

avatar image

Snart0x
6 3 3

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

1 answer: sort voted first

Try renaming the binaries folder, forcing the compiler to generate all files new

more ▼

answered Nov 12 '17 at 09:38 PM

avatar image

Unzkilled
310 3 7 10

avatar image Snart0x Nov 12 '17 at 10:08 PM

Tried it now, but I'm still getting the same error.

avatar image Unzkilled Nov 13 '17 at 09:05 AM

Can you try the same with the Intermediate folder?

avatar image Snart0x Nov 13 '17 at 10:42 AM

I'm still getting the same error.

(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