[mlpack-git] [mlpack/mlpack] "undefined reference" when complie "adaboost_test.cpp" (#779)
kc420
notifications at github.com
Mon Sep 5 09:16:27 EDT 2016
I have built and installed mlpack follow the tutorial:
http://mlpack.org/docs/mlpack-2.0.3/doxygen.php?doc=build.html#build
Do you mean that?
When I build the tests without modification, error message shows:
Scanning dependencies of target mlpack_test
[ 1%] Building CXX object CMakeFiles/mlpack_test.dir/mlpack_test.o
[ 2%] Building CXX object CMakeFiles/mlpack_test.dir/adaboost_test.o
In file included from /usr/include/c++/5/cstdint:35:0,
from /usr/local/include/mlpack/prereqs.hpp:30,
from /usr/local/include/mlpack/core.hpp:207,
from /home/cwind/Desktop/Downloads/tests/adaboost_test.cpp:14:
/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.
#error This file requires compiler and library support \
^
In file included from /usr/local/include/mlpack/prereqs.hpp:65:0,
from /usr/local/include/mlpack/core.hpp:207,
from /home/cwind/Desktop/Downloads/tests/adaboost_test.cpp:14:
After I add this to CMakeLists:
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")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
(I copied it from stackoverflow)
The error I've posted occurred after ran to 100%
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/779#issuecomment-244744564
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160905/4cbf0988/attachment-0001.html>
More information about the mlpack-git
mailing list