我下载了免费版本的ArrayFire库。我试着用它来测试矩阵乘法。但是,我得到了一堆未定义的引用,例如
matrixdata.cpp:(.text+0x19e5): undefined reference to af::array::array<unsigned char>(int, int, unsigned char const*, af::af_source_t, int)
matrixdata.cpp:(.text+0x1a22): undefined reference to af::array::operator=(af::array const&)'
matrixdata.cpp:(.text+0x1a31): undefined reference to af::array::~array()当然,我注意到我还没有将arrayfire库链接到我的makefile中。
然而,我所有连接库的尝试都失败了。有人能告诉我应该添加什么命令来链接适当的库吗?
lib文件夹中的文件是:
libafcpu.so
libafcuda.so
libafopencl.so
libclBLAS.so
libclBLAS.so.2
libclBLAS.so.2.3.0
libclFFT.so
libclFFT.so.2
libclFFT.so.2.3.0
libStatTimer.so
libStatTimer.so.2
libStatTimer.so.2.3.0发布于 2015-05-01 14:31:42
安装后,将ArrayFire的共享库的路径添加到LD_LIBRARY_PATH变量中。一旦您这样做,它只是指示您需要使用-l选项的正确后端库。对于cpu来说,它将是-lafcpu。
你在指挥什么?
https://stackoverflow.com/questions/29982028
复制相似问题