• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Error during compilation in visual studio (error C2338)

procederek

New Member
Joined
Oct 24, 2022
Messages
7
Reaction score
0
C++:
Błąd    C2338    static_assert failed: 'Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt' (kompilowanie pliku źródłowego ..\src\iomapserialize.cpp)    theforgottenserver    C:\vcpkg\installed\x64-windows\include\fmt\core.h    1691   
Błąd    C2338    static_assert failed: 'Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt' (kompilowanie pliku źródłowego ..\src\iomarket.cpp)    theforgottenserver    C:\vcpkg\installed\x64-windows\include\fmt\core.h    1691
I've been having this problem for a day now, does anyone know what could be the cause?
 
why im still facing errors after fixes from PR on tfs 1.5 nekiro 7.7 version?
edit: im compiling this on macOS

C++:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/actions.cpp:23:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/bed.h:23:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/item.h:25:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/items.h:23:
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/const.h:207:29: warning: '/*' within block comment [-Wcomment]
        MESSAGE_STATUS_SMALL = 21, /*White message at the bottom of the game window"
                                   ^
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/const.h:208:27: warning: '/*' within block comment [-Wcomment]
        MESSAGE_INFO_DESCR = 22, /*Green message in game window and in the console
                                 ^
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/actions.cpp:23:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/bed.h:23:
In file included from /Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/item.h:27:
/Users/x/Otsik/tfs-1.5-dwongrade-nekiro-version-7.7/src/tools.h:102:9: error: use of undeclared identifier 'fmt'
        return fmt::underlying(e);
               ^
2 warnings and 1 error generated.
make[2]: *** [CMakeFiles/tfs.dir/src/actions.cpp.o] Error 1
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
make: *** [all] Error 2
 
@OTAmator fmt::underlying was introduced in 9.x.x version of fmt.
Check this out:

Check installed version with:
Diff:
vcpkg list

fmt:x64-windows                                   9.1.0#1             Formatting library for C++. It can be used as a ...
 
I have the same error, but I don't know what to change, could anyone help?
Severity Code Description Project File Line Suppression State
Error C2338 Cannot format an argument. To make type T formattable provide a formatter<T> specialization: API Reference — fmt 10.1.0 documentation (https://fmt.dev/latest/api.html#udt) (compiling source file ..\src\iomarket.cpp) theforgottenserver C:\vcpkg\installed\x64-windows\include\fmt\core.h 1581
 
Just switched my vcpkg registry folder and had to install libraries again.
Worked great! This was the only error I wasn't able to solve by using "Show potential fixes". Thanks ;)
 
Back
Top