error: ‘slots_reference’ was not declared in this scope
/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
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:
sed -i 's/++11/++14/g' CMakeLists.txt
It's a bit hacky since the demos use #ifdef COMPILEDWITHC11 but it works.
This worked for me:
sed -i 's/++11/++14/g' CMakeLists.txtIt's a bit hacky since the demos use
#ifdef COMPILEDWITHC11but it works.
Do the demos still work? If not, is there a way to make them work?
Do the demos still work? If not, is there a way to make them work?
They all build fine after sed -i 's/++11/++14/g' CMakeLists.txt and I can confirm the TUM examples execute fine.
This didn't work for me
This worked for me:
sed -i 's/++11/++14/g' CMakeLists.txtIt's a bit hacky since the demos use
#ifdef COMPILEDWITHC11but it works.
worked for me
sed -i 's/++11/++14/g' CMakeLists.txt
@rgreid This also worked for me. Thank you so much. But I was wondering, what is this command doing to the CMakeLists ?
sed -i 's/++11/++14/g' CMakeLists.txt
@rgreid This also worked for me. Thank you so much. But I was wondering, what is this command doing to the CMakeLists ?
hello Mechazo, could you please tell me where to add this command in cmakelist.txt. i am confusing..??
thanks alot
sed -i 's/++11/++14/g' CMakeLists.txt
@rgreid This also worked for me. Thank you so much. But I was wondering, what is this command doing to the CMakeLists ?
hello Mechazo, could you please tell me where to add this command in cmakelist.txt. i am confusing..??
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
# 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()
and add
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS OFF)
In CMakeLists.txt, remove
# 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()and add
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_EXTENSIONS OFF)
It works for me. Thanks! btw, rem add add_definitions(-DCOMPILEDWITHC11)
# # 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)
This worked for me:
sed -i 's/++11/++14/g' CMakeLists.txt
I was able to compile and excecute all the demos
sed -i 's/++11/++14/g' CMakeLists.txt
This worked for me, but you should use "make" instead of "make -j4". I do not know the reason.
This worked for me:
sed -i 's/++11/++14/g' CMakeLists.txtIt's a bit hacky since the demos use
#ifdef COMPILEDWITHC11but it works.
It works!