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. 

LNK2001 unresolved external symbol, Steamworks

I'm having troubles with getting Steamworks integration to work. I have tried resources and questions from either here or StackOverflow and haven't been able to figure it out. Any help or guidance will be useful, thank you.

 Severity    Code    Description    Project    File    Line    Suppression State
 Error    LNK2001    unresolved external symbol "public: void __cdecl CSteamID::SetFromString(char const *,enum EUniverse)" (?SetFromString@CSteamID@@QEAAXPEBDW4EUniverse@@@Z)    lsr    C:\Users\Evan\Documents\Unreal Projects\lsr\Intermediate\ProjectFiles\BlueprintSteamAPI.gen.cpp.obj    1    


 #pragma once
 #pragma push_macro("ARRAY_COUNT")
 #include "CoreMinimal.h"
 #include "Kismet/BlueprintFunctionLibrary.h"
 #include "ThirdParty/steamworks/Steamv139/sdk/public/steam/steam_api.h"
 #include "ThirdParty/steamworks/Steamv139/sdk/public/steam/isteamfriends.h"
 #pragma pop_macro("ARRAY_COUNT")
 #include "BlueprintSteamAPI.generated.h"
 class LSR_API UBlueprintSteamAPI : public UBlueprintFunctionLibrary
     UFUNCTION(BlueprintCallable, Category = "Steam")
     static void SendSteamMessage(FString SteamID64, FString type) {
         char* typeresult = TCHAR_TO_ANSI(*type);
         char* SteamID642 = TCHAR_TO_ANSI(*SteamID64);
         RawSteamMessage(SteamID642, typeresult);
     static CSteamID steamIDGet(char*  SteamID64) {
         CSteamID cID;
         cID.SetFromString(SteamID64, k_EUniversePublic);
         return cID;
     static void RawSteamMessage(char*  SteamID64, char* type) {
         if (SteamAPI_Init()) {
             CSteamID id = steamIDGet(SteamID64);
             SteamFriends()->ActivateGameOverlayToUser(type, id);


 using UnrealBuildTool;
 public class lsr : ModuleRules
     public lsr(ReadOnlyTargetRules Target) : base(Target)
         PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
         PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore","OnlineSubsystemUtils","OnlineSubsystem","Steamworks"});
         PrivateDependencyModuleNames.AddRange(new string[] { "Steamworks" });


 using UnrealBuildTool;
 using System.Collections.Generic;
 public class lsrTarget : TargetRules
     public lsrTarget(TargetInfo Target) : base(Target)
         Type = TargetType.Game;
         bUsesSteam = true;
         ExtraModuleNames.AddRange( new string[] { "lsr" } );
Product Version: UE 4.21
more ▼

asked Dec 12 '18 at 11:05 PM in C++ Programming

avatar image

1 1 1

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

1 answer: sort voted first

You seem to add Steamworks decency in wrong way, if you look on how OnlineSubsystemSteam does it:


It should be like this:

 AddEngineThirdPartyPrivateStaticDependencies(Target, "Steamworks");
more ▼

answered Dec 12 '18 at 11:14 PM

avatar image

36.6k 931 169 1111

avatar image Theopathy Dec 12 '18 at 11:22 PM

Still getting the same error, thank you for this though. Will keep it in.

avatar image Theopathy Dec 12 '18 at 11:32 PM

Okay it seems to be that "k_EUniversePublic" is causing it.

(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