我正在尝试使用gcc将某些.c文件转换为R文件。我正在谈论的文件是circulant.c和circulant.h文件,位于:
http://www.columbia.edu/~ad3217/fbm.html
在那里,作者还提供了简短说明,说明如何使用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的注释标题块中:
/* 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
文件复制到目录中。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句