我正在尝试使用 gcc 将一些 .c 文件转换为 R 文件。 我所说的文件是位于以下位置的 circulant.c 和 circulant.h 文件:
http://www.columbia.edu/~ad3217/fbm.html
作者还提供了如何使用 gcc 进行操作的简短说明。 到目前为止我所做的事情:
- 通过 Win10 Linux 子系统安装了 Ubuntu
- 安装构建要点
- 已安装 gcc
从
下载了所有meschach文件将meschach文件夹和circulant.x文件放到一个文件夹中,运行命令
$gcc -I meschach/-c circulant.c
给出错误:
In file included from circulant.c:25:0:
circulant.h:11:20: fatal error: matrix.h: No such file or directory
compilation terminated.
我希望对 gcc 有更多了解的人可以帮助我并指出解决方案。
最佳答案
您没有使用正确的头文件。
您需要首先解决一些依赖性问题。来自 circulant.c 的评论标题 block :
/* This program simulates fractional Gaussian noise or fractional */
/* Brownian motion using the Wood and Chan algorithm. */
/* The C-packages Ranlib and Meschach are used, both available */
/* via Netlib (http://www.netlib.org). */
在我看来,缺少的 matrix.h
和 matrix2.h
文件来自 meschach图书馆。
您不能只将 .shar
文件复制到目录中。
关于c - 使用 gcc 编译/转换,matrix.h : No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49887196/