Reputation: 31
After I build and install arrayfire, and I read the complete documentation in http://www.arrayfire.com/docs/createprojects.htm#createprojects_linux, bur I could not find the arrayfire/lib64
in my computer, so how to set up Environment Variable AF_PATH
?
export AF_PATH=/home/arrayfire
export LD_LIBRARY_PATH=$AF_PATH/lib64/:$LD_LIBRARY_PATH
And I also didn't find libafcu.so
, so there is problem when add the flags described in the hyperlink above:
g++ *.cpp -lafcu
I wonder if there is any thing I have misunderstand? This is my first time trying to programe in linux.
Thank you
Upvotes: 2
Views: 369
Reputation: 31
Just replace -lafcu with -lafcuda and there is no directory $AF_PATH/lib64 anymore, but when change the library directory to $AF_PATH/lib, the problem could be solved.
Upvotes: 1
Reputation: 3390
I couldn't get the examples to compile because of the same issue you mentioned. Instead of -lafcu
, link against libafcuda.so
by using -lafcuda
. It seems that the latest commit in the master branch has changes a few things here and there.
If you do make install
after the compilation, the dynamic library files will be copied in /usr/local/lib
(under Ubuntu 14.04) (you'll have libafcpu.so
and libafcuda.so
). Thus, set your LD_LIBRARY_PATH
accordingly.
Upvotes: 0