mac cmake c++ 求助

image

求助

> cmake .. && make && ./Rasterizer

-- Configuring done

-- Generating done

-- Build files have been written to: /Users/cregskin/code/cs-note/computer-graphics/GAMES101-course/course_2/build

[ 25%] Building CXX object CMakeFiles/Rasterizer.dir/rasterizer.cpp.o

/Users/cregskin/code/cs-note/computer-graphics/GAMES101-course/course_2/rasterizer.cpp:126:16: error:

implicit instantiation of undefined template 'std::__1::array<Eigen::Matrix<float, 4, 1, 0, 4, 1>,

3>'

auto v = t.toVector4();

^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__tuple:219:64: note:

template is declared here

template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;

^

1 error generated.

make[2]: *** [CMakeFiles/Rasterizer.dir/rasterizer.cpp.o] Error 1

make[1]: *** [CMakeFiles/Rasterizer.dir/all] Error 2

make: *** [all] Error 2

回答:

解决了,在
/Users/cregskin/code/cs-note/computer-graphics/GAMES101-course/course_2/rasterizer.cpp 顶部添加 #include <array>

以上是 mac cmake c++ 求助 的全部内容, 来源链接: utcz.com/p/193237.html

回到顶部