alecjacobson / computer-graphics-bounding-volume-hierarchy

Computer Graphics Assignment about Bounding Volume Hierarchies
123 stars 45 forks source link

Problem with make #26

Closed Yanksi closed 5 years ago

Yanksi commented 5 years ago

When I was trying to make the executable, the following problem occurred, and I have no idea how to fix the problem. Can someone help me with this?

[ 82%] Building CXX object CMakeFiles/rays.dir/rays.cpp.o
[ 85%] Linking CXX executable rays
libcore.a(ray_intersect_triangle.cpp.o): In function `ray_intersect_triangle(Ray const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, double, double, double&)':
ray_intersect_triangle.cpp:(.text+0x113): undefined reference to `Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::cross_product_return_type<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::type Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::cross<Eigen::Matrix<double, 3, 1, 0, 3, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> > const&) const'
ray_intersect_triangle.cpp:(.text+0x2d1): undefined reference to `Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::cross_product_return_type<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::type Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::cross<Eigen::Matrix<double, 3, 1, 0, 3, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> > const&) const'
ray_intersect_triangle.cpp:(.text+0x2ee): undefined reference to `Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::cross_product_return_type<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::type Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::cross<Eigen::Matrix<double, 3, 1, 0, 3, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> > const&) const'
ray_intersect_triangle.cpp:(.text+0x30b): undefined reference to `Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::cross_product_return_type<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::type Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::cross<Eigen::Matrix<double, 3, 1, 0, 3, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> > const&) const'
collect2: error: ld returned 1 exit status
CMakeFiles/rays.dir/build.make:101: recipe for target 'rays' failed
make[2]: *** [rays] Error 1
CMakeFiles/Makefile2:107: recipe for target 'CMakeFiles/rays.dir/all' failed
make[1]: *** [CMakeFiles/rays.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
mShulman2015 commented 5 years ago

How did you solve this? I'm getting the same error