Linking a Third Party Library with only a Header causes errors

Hi!

I’m trying to make use of a very small library which consists of a single header file (specifically this one: GitHub - lieff/minimp4: Minimalistic MP4 mux/demux single header library). No DLL or static library, but I think this is causing me issues. I tried simply adding the header to my project but any calls to it give an “Unresolved external symbol” error on build. I then tried adding it as a third party library but I’m still getting the same error. All the tutorials I’ve seen with third party libraries involve a DLL and lib files, is there any way for me to do this without those? Is it possible that my build.cs is wrong? This is what it looks like:

using UnrealBuildTool;
using System.IO;
using System.Collections.Generic;

public class MiniMP4 : ModuleRules
{
    public MiniMP4(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string IncludePath = System.IO.Path.Combine(ModuleDirectory, "include");
        PublicIncludePaths.Add(IncludePath);
    }
}

the header is placed in /ThirdParty/MiniMP4/include/

I managed to get my answer from elsewhere but I hate it when someone solves a problem and doesn’t leave an answer for anyone else to find! Turned out I needed to add an implementation macro to the header file so simply adding the following line at the top of the header, fixed this.

#define MINIMP4_IMPLEMENTATION