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	

BlueprintSteamAPI.h

#pragma once

#pragma push_macro("ARRAY_COUNT")
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"

#undef ARRAY_COUNT

THIRD_PARTY_INCLUDES_START
#include "ThirdParty/steamworks/Steamv139/sdk/public/steam/steam_api.h"
#include "ThirdParty/steamworks/Steamv139/sdk/public/steam/isteamfriends.h"
THIRD_PARTY_INCLUDES_END

#pragma pop_macro("ARRAY_COUNT")
#include "BlueprintSteamAPI.generated.h"

/**
 * 
 */
UCLASS()
class LSR_API UBlueprintSteamAPI : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
	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);
			
		
		};

	}
};

lsr.Build.cs

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" });

        DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
    }
}

lsr.Target.cs

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" } );
	}
}

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

Okay it seems to be that “k_EUniversePublic” is causing it.

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

https://github.com/EpicGames/UnrealEngine/blob/b70f31f6645d764bcb55829228918a6e3b571e0b/Engine/Plugins/Online/OnlineSubsystemSteam/Source/OnlineSubsystemSteam.Build.cs

It should be like this:

AddEngineThirdPartyPrivateStaticDependencies(Target, "Steamworks");