Banging my head against the very basics again! What's wrong with this?

I’m just trying to decode a URL / percent encoded string

.h


// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "DanBPLib.generated.h"

/**
 * 
 */
UCLASS()
class THETOWERENG412_API UDanBPLib : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

		UFUNCTION(BlueprintPure, Category = "DanBpLibs|Encoding")
		static FString String__DecodeURLString(FString EncodedString);
	
	
};


.cpp



// Fill out your copyright notice in the Description page of Project Settings.

#include "TheTowerEng412.h"
#include "DanBPLib.h"
#include "GenericPlatformHttp.h"



FString UDanBPLib::String__DecodeURLString(FString EncodedString)
{

	return FGenericPlatformHttp::UrlDecode(EncodedString);

}


I’m getting

Error DanBPLib.cpp.obj : error LNK2019: unresolved external symbol “__declspec(dllimport) public: static class FString __cdecl FGenericPlatformHttp::UrlDecode(class FString const &)” (_imp?UrlDecode@FGenericPlatformHttp@@SA?AVFString@@AEBV2@@Z) referenced in function “private: static class FString __cdecl UDanBPLib::String__DecodeURLString(class FString)” (?String__DecodeURLString@UDanBPLib@@CA?AVFString@@V2@@Z)

Thanks for helping the terminally stuck with even basic c++

Seems like you’re missing a dependency, namely HTTP.

See Adding dependancies for HTTP and JSON.

Kris - thanks so much. I do so much blueprint work and know how to code quite well in Python and JS, but c++ always defeats whenever I try the simplest thing. I seriously need to do a short course. It’s the syntax most of the time but this time you were right about the dependencies.

Thanks!

You probably also want to make your function a public member.

Thanks jwatte - i’d actually already done that just after posting - Pro!

I wish there was a forum page for the c++ inept and those who help them - I always feel slightly anxious posting in the ‘pro’ section of the forum (as i see it). My problem I think is in digesting the help docs. If I go to any of the docs pages I can’t deduce what I need from the syntax example. For instance, recently (and I still haven’t been able to make it work), I’ve been working on a blueprint which spawns meshes to create 3D text. It works very well - it gets the ascii code of each char, then spawns a static mesh which has that ascii code in it’s name - like I say, it works well, but to make it perfect I need the kerning data, and there’s a function for this - FSlateFontCache::GetKerning - you put in two characters and the font and it’ll return the distance between the two characters - there’s a difference between ‘ii’ and ‘WW’ for example The syntax example on the page reads:

But try as I might I just couldn’t turn it into code that compiled! My goal is to be able to learn this stuff but I just keep hitting walls. Anyway - thankyou c++ heroes for keeping people like me stay afloat.

Thanks everyone!

Dan