-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
error: ‘slots_reference’ was not declared in this scope #387
Comments
were you able to fix it? |
yes, you need to change the compiler version in cmakelist.txt from c++11 -> c++14 |
@RG2806 Do you mean c++11 - > c++14? |
yes, |
@RG2806 Can you give some more details? Thanks alot. |
This worked for me:
It's a bit hacky since the demos use |
Do the demos still work? If not, is there a way to make them work? |
They all build fine after |
This didn't work for me |
worked for me |
@rgreid This also worked for me. Thank you so much. But I was wondering, what is this command doing to the CMakeLists ? |
hello Mechazo, thanks alot |
This is a command to run in the terminal that will replace "++11" with "++14" in the CMakeLists.txt files. You do not put it in the files themselves. |
In CMakeLists.txt, remove
and add
|
It works for me. Thanks! btw, rem add # # Check C++11 or C++0x support
# include(CheckCXXCompilerFlag)
# CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
# CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
# if(COMPILER_SUPPORTS_CXX11)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# add_definitions(-DCOMPILEDWITHC11)
# message(STATUS "Using flag -std=c++11.")
# elseif(COMPILER_SUPPORTS_CXX0X)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
# add_definitions(-DCOMPILEDWITHC0X)
# message(STATUS "Using flag -std=c++0x.")
# else()
# message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
# endif()
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS OFF)
add_definitions(-DCOMPILEDWITHC11) |
|
|
/home/rohan/Pangolin/components/pango_core/include/sigslot/signal.hpp:1180:65: error: ‘slots_reference’ was not declared in this scope
1180 | cow_copy_type<list_type, Lockable> ref = slots_reference();
| ~~~~~~~~~~~~~~~^~
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:104: CMakeFiles/ORB_SLAM3.dir/src/LocalMapping.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:272: CMakeFiles/ORB_SLAM3.dir/src/Frame.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:118: CMakeFiles/ORB_SLAM3.dir/src/LoopClosing.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:90: CMakeFiles/ORB_SLAM3.dir/src/Tracking.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:356: CMakeFiles/ORB_SLAM3.dir/src/G2oTypes.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:258: CMakeFiles/ORB_SLAM3.dir/src/Optimizer.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:358: CMakeFiles/ORB_SLAM3.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
The text was updated successfully, but these errors were encountered: