[英]Compiling C code with R header files
I need R header files to compile something. 我需要R头文件来编译某些内容。 I installed R on ubuntu via:
我通过以下方式在ubuntu上安装了R:
sudo apt-get r-base-dev
R works fine. R工作正常。 But I can't find the R headers such as Rmath.h.
但是我找不到R头,例如Rmath.h。 I get this error when I try to compile:
尝试编译时出现此错误:
gcc -g -std=c99 -I/usr/include -O3 -lRmath -lm -lpthread -o qcpg qcpg.c
In file included from qcpg.c:1:0:
qcpg.h:19:19: fatal error: Rmath.h: No such file or directory
compilation terminated.
make: *** [qcpg] Error 1
Any ideas?? 有任何想法吗??
You also want to do 你也想做
sudo apt-get install r-mathlib
which contains, among other things, the file /usr/include/Rmath.h
. 其中包含
/usr/include/Rmath.h
文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.