You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use gcc 13 and cmake 3.27.0 to compile a project with standard C++20. It shows the following errors:
/usr/local/include/fmt/ostream.h:158:1: error: 'FMT_EXPORT' does not name a type
158 | FMT_EXPORT template
| ^~~~~~~~~~
/usr/local/include/fmt/ostream.h:177:1: error: 'FMT_EXPORT' does not name a type
177 | FMT_EXPORT template <typename... T>
| ^~~~~~~~~~
/usr/local/include/fmt/ostream.h:186:1: error: 'FMT_EXPORT' does not name a type
186 | FMT_EXPORT
| ^~~~~~~~~~
/usr/local/include/fmt/ostream.h:194:1: error: 'FMT_EXPORT' does not name a type
194 | FMT_EXPORT template <typename... T>
| ^~~~~~~~~~
/usr/local/include/fmt/ostream.h:199:1: error: 'FMT_EXPORT' does not name a type
199 | FMT_EXPORT
I know that FMT_EXPORT is in fmt.cc. But I don't know why the compiler can not find it. The linking sentence in CMakeLists.txt is
I use gcc 13 and cmake 3.27.0 to compile a project with standard C++20. It shows the following errors:
/usr/local/include/fmt/ostream.h:158:1: error: 'FMT_EXPORT' does not name a type
158 | FMT_EXPORT template
| ^~~~~~~~~~
/usr/local/include/fmt/ostream.h:177:1: error: 'FMT_EXPORT' does not name a type
177 | FMT_EXPORT template <typename... T>
| ^~~~~~~~~~
/usr/local/include/fmt/ostream.h:186:1: error: 'FMT_EXPORT' does not name a type
186 | FMT_EXPORT
| ^~~~~~~~~~
/usr/local/include/fmt/ostream.h:194:1: error: 'FMT_EXPORT' does not name a type
194 | FMT_EXPORT template <typename... T>
| ^~~~~~~~~~
/usr/local/include/fmt/ostream.h:199:1: error: 'FMT_EXPORT' does not name a type
199 | FMT_EXPORT
I know that FMT_EXPORT is in fmt.cc. But I don't know why the compiler can not find it. The linking sentence in CMakeLists.txt is
target_link_libraries(${PROJECT_NAME} fmt)
It seems that this problem comes with another library spdlog. See gabime/spdlog#2872 (comment)
The text was updated successfully, but these errors were encountered: