make[2]: *** 在 CGAL 中没有创建目标 `/usr/lib/i386-linux-gnu/libmpfr.so' 的规则
make[2]: *** No rule to make target `/usr/lib/i386-linux-gnu/libmpfr.so' in CGAL
我正在使用 CGAL,我有这个最小的例子(应该没问题,因为它是一个例子):
#include <iostream>
#include <vector>
#include <CGAL/Cartesian_d.h>
#include <CGAL/point_generators_d.h>
typedef CGAL::Cartesian_d<double> Kd;
typedef Kd::Point_d Point;
typedef CGAL::Creator_uniform_d<std::vector<double>::iterator, Point>Creator_d;
int main ()
{
int nb_points = 10;
int dim =5;
double size = 100.0;
std::cout << "Generating "<<nb_points<<" random points in a"
<<" ball in "<<dim<<"D of center 0 and radius "<<size<<std::endl;
std::vector<Point> v;
v.reserve (nb_points);
CGAL::Random_points_in_ball_d<Point> gen (dim, 100.0);
for (int i = 0; i < nb_points; ++i) v.push_back (*gen++);
for (int i = 0; i < nb_points; ++i) std::cout<<" "<<v[i]<<std::endl;
return 0;
}
但是,我收到此错误:
samaras@samaras-A15:~/code/random_generator$ make
Scanning dependencies of target main
[100%] Building CXX object CMakeFiles/main.dir/main.cpp.o
make[2]: *** No rule to make target `/usr/lib/i386-linux-gnu/libmpfr.so', needed by `main'. Stop.
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2
我该怎么办?
我正在创建这样的 CmakeLists 文件:
~/code/CGAL-4.3/scripts/cgal_create_CMakeLists
cmake -DCGAL_DIR=$HOME/code/CGAL-4.3 .
如我所述here。
如果您需要更多信息,请告诉我。
--
cd /usr/lib/i386-linux-gnu/libmpfr.so
bash: cd: /usr/lib/i386-linux-gnu/libmpfr.so: No such file or directory
毕竟图书馆不见了,所以我这样做了,我们就可以了:
sudo apt-get install libmpfr-dev libmpfr-doc libmpfr4 libmpfr4-dbg
在 Debian 或 Ubuntu 上安装 CGAL 的最简单方法是 apt-get install libcgal-dev
(或 libcgal-qt4-dev
)。如果您要自己构建 CGAL,您仍然应该 apt-get build-dep cgal
安装最相关的依赖项。
我正在使用 CGAL,我有这个最小的例子(应该没问题,因为它是一个例子):
#include <iostream>
#include <vector>
#include <CGAL/Cartesian_d.h>
#include <CGAL/point_generators_d.h>
typedef CGAL::Cartesian_d<double> Kd;
typedef Kd::Point_d Point;
typedef CGAL::Creator_uniform_d<std::vector<double>::iterator, Point>Creator_d;
int main ()
{
int nb_points = 10;
int dim =5;
double size = 100.0;
std::cout << "Generating "<<nb_points<<" random points in a"
<<" ball in "<<dim<<"D of center 0 and radius "<<size<<std::endl;
std::vector<Point> v;
v.reserve (nb_points);
CGAL::Random_points_in_ball_d<Point> gen (dim, 100.0);
for (int i = 0; i < nb_points; ++i) v.push_back (*gen++);
for (int i = 0; i < nb_points; ++i) std::cout<<" "<<v[i]<<std::endl;
return 0;
}
但是,我收到此错误:
samaras@samaras-A15:~/code/random_generator$ make
Scanning dependencies of target main
[100%] Building CXX object CMakeFiles/main.dir/main.cpp.o
make[2]: *** No rule to make target `/usr/lib/i386-linux-gnu/libmpfr.so', needed by `main'. Stop.
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2
我该怎么办?
我正在创建这样的 CmakeLists 文件:
~/code/CGAL-4.3/scripts/cgal_create_CMakeLists
cmake -DCGAL_DIR=$HOME/code/CGAL-4.3 .
如我所述here。
如果您需要更多信息,请告诉我。
--
cd /usr/lib/i386-linux-gnu/libmpfr.so
bash: cd: /usr/lib/i386-linux-gnu/libmpfr.so: No such file or directory
毕竟图书馆不见了,所以我这样做了,我们就可以了:
sudo apt-get install libmpfr-dev libmpfr-doc libmpfr4 libmpfr4-dbg
在 Debian 或 Ubuntu 上安装 CGAL 的最简单方法是 apt-get install libcgal-dev
(或 libcgal-qt4-dev
)。如果您要自己构建 CGAL,您仍然应该 apt-get build-dep cgal
安装最相关的依赖项。