Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.5k views
in Technique[技术] by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...