KVP_
KVP_

Reputation: 15

Using ArrayFire libraries

I downloaded the free version of ArrayFire library. I tried to test matrix multiplication with it. However I got a bunch of undefined references such as

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()

Naturally I noticed that I haven't linked arrayfire libraries in my makefile.
However, all my attempts to link the libraries have failed. Can someone please tell what command should I add to link the proper libraries

The files in the lib folder are:

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

Upvotes: 1

Views: 860

Answers (1)

pradeep
pradeep

Reputation: 747

After installation, add the path to the shared libraries of ArrayFire to your LD_LIBRARY_PATH variable. Once you do that, it is merely indicating the correct backend library you need with -l option. Say for cpu, it would be -lafcpu.

What command are you trying ?

Upvotes: 1

Related Questions