I wrote that code below:
#pragma once
#include "Containers/trianglString.h"
#include "Misc/HelperDefines.h"
#include "Misc/DateTime.h"
class FPaths
{
public:
static void Initialize()
{
FDateTime Now = FDateTime::Now();
m_LogPath = FString("Logs/LogOutput_") + FString::ToString(Now.GetYear()) + "-"
+ FString::ToString(Now.GetMonth()) + "-" +
FString::ToString(Now.GetDay()) + ".txt";
}
FORCEINLINE static FString GetLogPath() { return m_LogPath; }
private:
static FString m_LogPath;
};
But when i try to compile, it gives undefined symbol error. I tried to make it a non-static class, and it worked. But I want this class to be an static class because it is the one that makes most sense to me. But this thing does not work. For the FORCEINLINE thing, it is basically __forceinline. FString is my version of std::string. And FDateTime class works like a charm, I tested it.