Closed iris0329 closed 5 years ago
Try adding this line to the external/densecrf/CMakeLists.txt
, delete the build
folder and try again.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
When I run make in root folder, make -j mkdir -p build/src/ mkdir -p build/src/ g++ -O2 -pedantic -Iexternal/densecrf/include -c -o build/src/cnpy.cpp.o src/cnpy.cpp g++ -O2 -pedantic -Iexternal/densecrf/include -c -o build/src/main.cpp.o src/main.cpp In file included from /usr/include/c++/5/regex:35:0, from src/cnpy.cpp:13: /usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
^
In file included from src/cnpy.cpp:5:0:
src/cnpy.h:56:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptr<std::vector
@pqhieu Thanks for your help ! It works !
@zhangguanghui1 Sorry, I am not familiar with c++ (; ''༎ຶД༎ຶ'' ), but it shows This file requires compiler and library support
, maybe you should activate c++11 compiler? set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
is used to activate c++11, maybe you could have a try.
but why not follow the guide in the README
, it works.
Hi @zhangguanghui1,
Try adding this to the CXXFLAGS
line in the Makefile
: -std=c++11
.
I have updated the code accordingly.
@pqhieu Thank you very much.
Hi @pqhieu ,
When I compile CRF, all is good, but when I run
make
, it shows :Can you give me some advice? Without CRF, I could run the whole project successfully, but I am really interested in CRF part.
I am using
python=3.7
,torch=1.1.0
Thanks for your help !