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"

Moving existing source code into new project

Hey,

To put it simply, I've created a new project named the same as my exisiting one, a C++ 2D side scroller, and coppied the Source folder from my exisiting project into the new one. I know all the code comiples fine but when I try and build from the .uproject or inside Visual Studio it fails due to:

 2>Module.Test2D.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl UUserWidget::UUserWidget(class FObjectInitializer const &)" (__imp_??0UUserWidget@@QEAA@AEBVFObjectInitializer@@@Z) referenced in function "public: __cdecl UAbilityBar::UAbilityBar(class FObjectInitializer const &)" (??0UAbilityBar@@QEAA@AEBVFObjectInitializer@@@Z)
 2>Module.Test2D.gen.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl UUserWidget::UUserWidget(class FObjectInitializer const &)" (__imp_??0UUserWidget@@QEAA@AEBVFObjectInitializer@@@Z)
 2>Module.Test2D.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl UUserWidget::AddToViewport(int)" (__imp_?AddToViewport@UUserWidget@@QEAAXH@Z) referenced in function "public: virtual void __cdecl ATest2DPlayerController::BeginPlay(void)" (?BeginPlay@ATest2DPlayerController@@UEAAXXZ)
 2>Module.Test2D.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl UUserWidget::SetOwningPlayer(class APlayerController *)" (__imp_?SetOwningPlayer@UUserWidget@@QEAAXPEAVAPlayerController@@@Z) referenced in function "public: void __cdecl ATest2DCharacter::SpawnWidgets(void)" (?SpawnWidgets@ATest2DCharacter@@QEAAXXZ)
 2>Module.Test2D.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class UUserWidget * __cdecl UUserWidget::CreateWidgetOfClass(class UClass *,class UGameInstance *,class UWorld *,class APlayerController *)" (__imp_?CreateWidgetOfClass@UUserWidget@@SAPEAV1@PEAVUClass@@PEAVUGameInstance@@PEAVUWorld@@PEAVAPlayerController@@@Z) referenced in function "class UBasicHUD * __cdecl CreateWidget<class UBasicHUD>(class APlayerController *,class UClass *)" (??
  

I've tried using Generate VS Files from the .uproject, cleaning, updating the engine, updating VS 2017. But my old project still works.

I'm Using UE 17.1 and VS 2017.

Product Version: UE 4.17
Tags:
more ▼

asked Aug 22 '17 at 11:10 PM in C++ Programming

avatar image

Belven
92 19 35 47

avatar image Belven Aug 23 '17 at 08:16 AM

I tried comparing the folder to my existing project folder with beyond compare, and there was almost no differences. Unless I'm wrong, I'm pretty sure the source folder has no head references to anything and should be drag drop

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

0 answers: sort voted first
Be the first one to answer this question
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