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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Linking error (unresolved symbol) in BP Function Library class

I tried to implement the code of a friend from IRC, the original code of him is here: http://hastebin.com/otaranepuc.cpp

Here's my version: http://www.fpaste.org/186506/17963114/raw/

My code after compilation shows those errors in Visual Studio 2013: Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) class UScriptStruct __cdecl Z_Construct_UScriptStruct_FKeyEvent(void)" (__imp_?Z_Construct_UScriptStruct_FKeyEvent@@YAPEAVUScriptStruct@@XZ) referenced in function "class UFunction __cdecl Z_Construct_UFunction_UKeybindingBlueprintLibrary_GetKeybindForEvent(void)" (?Z_Construct_UFunction_UKeybindingBlueprintLibrary_GetKeybindForEvent@@YAPEAVUFunction@@XZ)
\ProjectFiles\CarCarCar.generated.cpp.obj CarCarCar Error 2 error LNK1120: 1 unresolved externals \game\Binaries\Win64\UE4Editor-CarCarCar.dll CarCarCar Error 3 error : Failed to produce item: \UE4Editor-CarCarCar.dll \game\Intermediate\ProjectFiles\ERROR CarCarCar

Product Version: Not Selected
Tags:
more ▼

asked Feb 17 '15 at 02:02 PM in C++ Programming

avatar image

Eduard Gotwig
156 12 17 43

avatar image mpie Feb 17 '15 at 03:51 PM

Check if InputCore is in your module build file (CarCarCar.Build.cs)

avatar image Eduard Gotwig Feb 17 '15 at 04:43 PM

Thats the content of the file: // Fill out your copyright notice in the Description page of Project Settings.

 using UnrealBuildTool;
 
 public class CarCarCar : ModuleRules
 {
     public CarCarCar(TargetInfo Target)
     {
         PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
 
         PrivateDependencyModuleNames.AddRange(new string[] {  });
 
         // Uncomment if you are using Slate UI
         // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
         
         // Uncomment if you are using online features
         // PrivateDependencyModuleNames.Add("OnlineSubsystem");
         // if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
         // {
         //        if (UEBuildConfiguration.bCompileSteamOSS == true)
         //        {
         //            DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
         //        }
         // }
     }
 }
 
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I was off. You need to add SlateCore to the module names. Change that part:

 // Uncomment if you are using Slate UI
 PrivateDependencyModuleNames.AddRange(new string[] { "SlateCore" });

The reason is this: FKeyEvent is defined in the SlateCore module.

If you encounter this error or a smiliar one in the future look out for the symbol name in the error message "Z_Construct_UScriptStruct_FKeyEvent" and find out where it is defined. Most of the times the module name is Engine/Source/Runtime/ModuleName or Engine/Source/Editor/ModuleName

more ▼

answered Feb 17 '15 at 04:53 PM

avatar image

mpie
211 9 3 11

avatar image Eduard Gotwig Feb 17 '15 at 05:40 PM

Thank you it works now. Can you please convert your comment to a question, so I can mark it as solved? Thanks again mate, you safed my day!

(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