'Unresolved External Symbol - FMT

This is a strange error, because it only happens with this function:

#define FMT_HEADER_ONLY
#include <fmt/os.h>
#include <fmt/format.h>
#include <fmt/core.h>

int main() {
    auto out = fmt::output_file("guide.txt");
    out.print("Don't {}", "Panic");

    return 0;
}

Error:

Severity    Code    Description Project File    Line    Suppression State
Error   LNK2019 unresolved external symbol "public: __cdecl fmt::v8::file::file(class fmt::v8::basic_cstring_view<char>,int)" (??0file@v8@fmt@@QEAA@V?$basic_cstring_view@D@12@H@Z) referenced in function "private: __cdecl fmt::v8::ostream::ostream(class fmt::v8::basic_cstring_view<char>,struct fmt::v8::detail::ostream_params const &)" (??0ostream@v8@fmt@@AEAA@V?$basic_cstring_view@D@12@AEBUostream_params@detail@12@@Z)    FMTDemo N:\Programs\FMTDemo\FMTDemo\FMTDemo.obj 1   
Error   LNK2019 unresolved external symbol "public: __cdecl fmt::v8::file::~file(void)" (??1file@v8@fmt@@QEAA@XZ) referenced in function "int `private: __cdecl fmt::v8::ostream::ostream(class v8::ostream::basic_cstring_view<char>,struct v8::ostream::detail::ostream_params const &)'::`1'::dtor$0" (?dtor$0@?0???0ostream@v8@fmt@@AEAA@V?$basic_cstring_view@D@12@AEBUostream_params@detail@12@@Z@4HA)    FMTDemo N:\Programs\FMTDemo\FMTDemo\FMTDemo.obj 1   
Error   LNK2019 unresolved external symbol "public: unsigned __int64 __cdecl fmt::v8::file::write(void const *,unsigned __int64)" (?write@file@v8@fmt@@QEAA_KPEBX_K@Z) referenced in function "public: void __cdecl fmt::v8::ostream::flush(void)" (?flush@ostream@v8@fmt@@QEAAXXZ) FMTDemo N:\Programs\FMTDemo\FMTDemo\FMTDemo.obj 1   
Error   LNK2001 unresolved external symbol "private: virtual void __cdecl fmt::v8::ostream::grow(unsigned __int64)" (?grow@ostream@v8@fmt@@EEAAX_K@Z)   FMTDemo N:\Programs\FMTDemo\FMTDemo\FMTDemo.obj 1   
Error   LNK1120 4 unresolved externals  FMTDemo N:\Programs\FMTDemo\x64\Debug\FMTDemo.exe   1   

Other functions like this works:

int main() {
    fmt::print(stderr, "Don't {}!", "panic");
    fmt::print(fmt::emphasis::bold | fg(fmt::color::red), "Elapsed time: {0:.2f} seconds", 1.23);
    return 0;
}

The headers and lib are included, so I don't understand where the problem is.

IDE: Visual Studio 2022

FMT Version: 8.1.1



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source