Fails to compile on mingw64
Morilli opened this issue · 0 comments
Morilli commented
Partial error log from building a project with the fmtlog
files included:
[...]/dep/fmtlog/include/fmtlog.h: In static member function 'static int64_t fmtlogT<__>::TSCNS::rdtsc()':
[...]/dep/fmtlog/include/fmtlog.h:274:14: error: there are no arguments to '__rdtsc' that depend on a template parameter, so a declaration of '__rdtsc' must be available [-fpermissive]
274 | return __rdtsc();
| ^~~~~~~
[...]/dep/fmtlog/include/fmtlog.h:274:14: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
This issue can be resolved with a #include <x86intrin.h>
at the top of fmtlog.h
.
Note also that at least on my system __rdtsc()
is defined as #define __rdtsc() __builtin_ia32_rdtsc ()
.