Welcome to OGeek Q&A 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 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...