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"

How can I avoid a Slate linking error - FKey?

Hello

I receive these compiler errors when trying to add an SButton to my slate contruct

 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl FKey::FKey(void)" (__imp_??0FKey@@QEAA@XZ) referenced in function "private: __cdecl FReply::FReply(void)" (??0FReply@@AEAA@XZ)

here the code that uses the SButton (If I comment the block out, everything works fine btw)

                         + SHorizontalBox::Slot()
                         .HAlign(HAlign_Right)
                         .AutoWidth()
                         .Padding(15, 15, 40, 15)
                         [
                             SNew(SButton)
                             .HAlign(HAlign_Center)
                             .OnClicked(this, &SMyHelper::OnMyButtonPressed, false)
                             .Text(LOCTEXT("MyHelper", "DoSomething"))
                         ]


my MyPlugin.Build.cs includes look like this

             PublicDependencyModuleNames.AddRange(
                 new string[]
                 {
                     "Core",
                     "CoreUObject",
                     "Engine",
                     "MainFrame",
                     "LevelEditor",
                     "EditorStyle",
                     "Slate",
                     // ... add other public dependencies that you statically link with here ...
                 }
                 );

I did add the "Slate" to the private dependencies to see if something changes but it had no effect.

Any idea what needs to be included to avoid that link error ?

Slate needs some serious documentation imho... There is way not enough simple sample usage cases available today. :(

Product Version: Not Selected
Tags:
more ▼

asked May 19 '14 at 03:07 PM in C++ Programming

avatar image

Chrys
306 21 29 44

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

2 answers: sort voted first

You need a private module dependency to InputCore in your project's Build.cs file.

more ▼

answered May 19 '14 at 03:07 PM

avatar image Chrys May 19 '14 at 03:11 PM

hey thanks gmpreussner! That was a quick answer :)

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

I solved this by adding PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });

to the build.cs file

more ▼

answered Jul 26 '14 at 02:51 AM

avatar image

Nan0Tubes
1 1

(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