gpt4 book ai didi

c++ - 制作[2] : *** No rule to make target `/usr/lib/i386-linux-gnu/libmpfr.so' in CGAL

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:57:39 25 4
gpt4 key购买 nike

我正在使用 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

最佳答案

在 Debian 或 Ubuntu 上安装 CGAL 的最简单方法是 apt-get install libcgal-dev(或 libcgal-qt4-dev)。如果您打算自己构建 CGAL,您仍然应该 apt-get build-dep cgal 安装最相关的依赖项。

关于c++ - 制作[2] : *** No rule to make target `/usr/lib/i386-linux-gnu/libmpfr.so' in CGAL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29340952/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com