我下载了适用于Linux的CULA Dense R17免费版。
我注意到在lib和lib64目录中,没有libcula_lapack.so,但只有libcula_lapack_basic.so。这应该是正常的,因为在culatools网站中指定在此版本中cula_lapack.dll / so在cula_lapack_basic.dll / so中重命名!
我以这种方式在.bashrc文件中设置环境变量:
export CULA_LIB_PATH_32=/usr/local/cula/lib
export CULA_ROOT=/usr/local/cula
export CULA_LIB_PATH_64=/usr/local/cula/lib64
export CULA_INC_PATH=/usr/local/cula/include
export LD_LIBRARY_PATH = "$CULA_LIB_PATH_64"
我尝试编译一个非常简单的c程序来测试cula是否正确运行。
#include <cula.h>
#include <stdio.h>
int main()
{
culaStatus s;
s = culaInitialize();
if (s != culaNoError)
printf("%s\n", culaGetStatusString(s));
culaShutdown();
return 0;
}
我编译:
gcc -I$CULA_INC_PATH -L$CULA_LIB_PATH_64 -lcula_lapack_basic prog.c -o prog
我收到了这个错误:
/tmp/ccDSdmLN.o: In function `main':
prog.c:(.text+0xe): undefined reference to `culaInitialize'
prog.c:(.text+0x21): undefined reference to `culaGetStatusString'
prog.c:(.text+0x33): undefined reference to `culaShutdown'
collect2: ld returned 1 exit status
在程序中编译程序或包含文件中的Probabily链接是错误的!
如何解决此编译问题? :roll :: roll :: :( 你能救我吗?