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
$ cmake ..
-- The CXX compiler identification is GNU 11.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 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
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/untwine/build
$ make
[ 5%] Building CXX object CMakeFiles/untwine.dir/bu/BuPyramid.cpp.o
[ 11%] Building CXX object CMakeFiles/untwine.dir/bu/CopcSupport.cpp.o
[ 17%] Building CXX object CMakeFiles/untwine.dir/bu/Processor.cpp.o
[ 23%] Building CXX object CMakeFiles/untwine.dir/bu/PyramidManager.cpp.o
[ 29%] Building CXX object CMakeFiles/untwine.dir/bu/Stats.cpp.o
[ 35%] Building CXX object CMakeFiles/untwine.dir/epf/BufferCache.cpp.o
[ 41%] Building CXX object CMakeFiles/untwine.dir/epf/Cell.cpp.o
[ 47%] Building CXX object CMakeFiles/untwine.dir/epf/Epf.cpp.o
/tmp/untwine/epf/Epf.cpp: In member function ‘untwine::PointCount untwine::epf::Epf::createFileInfo(const StringList&, untwine::StringList, std::vector<untwine::epf::FileInfo>&)’:
/tmp/untwine/epf/Epf.cpp:212:33: error: loop variable ‘xyz’ of type ‘const string&’ {aka ‘const std::__cxx11::basic_string<char>&’} binds to a temporary constructed from type ‘const char* const’ [-Werror=range-loop-construct]
212 | for (const std::string& xyz : { "X", "Y", "Z" })
| ^~~
/tmp/untwine/epf/Epf.cpp:212:33: note: use non-reference type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to make the copy explicit or ‘const char* const&’ to prevent copying
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/untwine.dir/build.make:174: CMakeFiles/untwine.dir/epf/Epf.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/untwine.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
The text was updated successfully, but these errors were encountered:
kannes
changed the title
Compoilation fails due to -Werror=range-loop-construct
Compilation fails due to -Werror=range-loop-construct
Sep 23, 2021
The text was updated successfully, but these errors were encountered: