lundi 2 décembre 2019

Linker errors using FMT for string interpolation in C++ [duplicate]

I am trying to use FTM for string interpolation in C++ but it is giving me some linker errors when I try to compile.

I have written the following class:

#include <string>
#include "include/fmt/format.h"

class A {
public:
    std::string sayHi(std::string name) {
        return fmt::format("Hello {0}", name);
    }
};

Using this class in my main results in some LNK2001 en LNK2019 errors. Here is a small sample of them: enter image description here I am guessing this is due to incorrect usage of the library. Am I missing some global variable that should be set?

Aucun commentaire:

Enregistrer un commentaire