Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the version 1.11.0 can't make #2576

Closed
yanzhang920817 opened this issue Dec 13, 2022 · 3 comments
Closed

the version 1.11.0 can't make #2576

yanzhang920817 opened this issue Dec 13, 2022 · 3 comments

Comments

@yanzhang920817
Copy link

[guoyanzhang@CoRobotServer spdlog-1.11.0]$ cd build/
[guoyanzhang@CoRobotServer build]$ ls
[guoyanzhang@CoRobotServer build]$ cmake ..
-- The CXX compiler identification is GNU 4.8.5
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build spdlog: 1.11.0
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Build type: Release
-- Generating example(s)
-- Generating install
-- Configuring done
-- Generating done
-- Build files have been written to: /home/guoyanzhang/spdlog-1.11.0/build
[guoyanzhang@CoRobotServer build]$ ls
CMakeCache.txt cmake_install.cmake CPackSourceConfig.cmake Makefile spdlogConfigTargets.cmake spdlog.pc
CMakeFiles CPackConfig.cmake example spdlogConfig.cmake spdlogConfigVersion.cmake
[guoyanzhang@CoRobotServer build]$ make
Scanning dependencies of target spdlog
[ 10%] Building CXX object CMakeFiles/spdlog.dir/src/spdlog.cpp.o
[ 20%] Building CXX object CMakeFiles/spdlog.dir/src/stdout_sinks.cpp.o
[ 30%] Building CXX object CMakeFiles/spdlog.dir/src/color_sinks.cpp.o
[ 40%] Building CXX object CMakeFiles/spdlog.dir/src/file_sinks.cpp.o
[ 50%] Building CXX object CMakeFiles/spdlog.dir/src/async.cpp.o
[ 60%] Building CXX object CMakeFiles/spdlog.dir/src/cfg.cpp.o
[ 70%] Building CXX object CMakeFiles/spdlog.dir/src/bundled_fmtlib_format.cpp.o
[ 80%] Linking CXX static library libspdlog.a
[ 80%] Built target spdlog
Scanning dependencies of target example
[ 90%] Building CXX object example/CMakeFiles/example.dir/example.cpp.o
/home/guoyanzhang/spdlog-1.11.0/example/example.cpp:267:13: 错误:在不同命名空间内对‘template<class T, class Char, class Enable> struct fmt::v9::formatter’的特例化 [-fpermissive]
struct fmt::formatter<my_type> : fmt::formatterstd::string
^
In file included from /home/guoyanzhang/spdlog-1.11.0/include/spdlog/fmt/fmt.h:27:0,
from /home/guoyanzhang/spdlog-1.11.0/include/spdlog/common.h:45,
from /home/guoyanzhang/spdlog-1.11.0/include/spdlog/spdlog.h:12,
from /home/guoyanzhang/spdlog-1.11.0/example/example.cpp:29:
/home/guoyanzhang/spdlog-1.11.0/include/spdlog/fmt/bundled/core.h:791:8: 错误: 从‘template<class T, class Char, class Enable> struct fmt::v9::formatter’的定义 [-fpermissive]
struct formatter {
^
make[2]: *** [example/CMakeFiles/example.dir/example.cpp.o] 错误 1
make[1]: *** [example/CMakeFiles/example.dir/all] 错误 2
make: *** [all] 错误 2

@tt4g
Copy link
Contributor

tt4g commented Dec 13, 2022

Duplicate #2333

This is GCC problem, GCC v4.8 does not fully support the C++11 standard.
See https://stackoverflow.com/a/36970437

@yanzhang920817
Copy link
Author

yanzhang920817 commented Dec 13, 2022

maybe you can support two standard : C++11 or before.

@bsa-niias
Copy link

Same error when using gcc 5.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants