Error compiling own project with arrayfire

[Old posts from the commercial version of ArrayFire] Issues and comments for download and installation. Getting up and running.

Moderators: melonakos, pavanky

Error compiling own project with arrayfire

Postby Voldymyr » Thu Feb 07, 2013 9:30 am

I managed to install arrayfire and compile all examples in installation directory and outside installation directory. So everything seems to work fine. I use ubuntu based linux.
But, when I try to compile my own project that has arrayfire, I get error that looks like this:

# make
cc -m64 -Wall -Werror -I/myname/Desktop/ArrayFire/arrayfire/include -I/usr/local/cuda/include -O2 -DNDEBUG -m64 -Wall -Werror -I/myname/Desktop/ArrayFire/arrayfire/include -I/usr/local/cuda/include -O2 -DNDEBUG -lrt -Wl,--no-as-needed -L/myname/Desktop/ArrayFire/arrayfire/lib64 -laf -L/usr/local/cuda/lib64 -lcuda -lcudart -lcurand -lcusparse -lpthread -lstdc++ -lm -Wl,-rpath,/myname/Desktop/ArrayFire/arrayfire/lib64,-rpath,/myname/Desktop/ArrayFire/arrayfire/lib64,-rpath,/usr/local/cuda/lib64 benchmark.c -o benchmark
In file included from /myname/Desktop/ArrayFire/arrayfire/include/arrayfire.h:139:0,
from benchmark.c:4:
/myname/Desktop/ArrayFire/arrayfire/include/af/array.h:9:1: error: unknown type name ânamespaceâ
/myname/Desktop/ArrayFire/arrayfire/include/af/array.h:9:14: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â{â token In file included from /myname/Desktop/ArrayFire/arrayfire/include/af/array.h:18:0,
from /myname/Desktop/ArrayFire/arrayfire/include/arrayfire.h:139,
from benchmark.c:4:
/myname/Desktop/ArrayFire/arrayfire/include/af/dims.h:11:20: fatal error: iostream: No such file or directory compilation terminated.
make: *** [benchmark] Error 1

I use Makefile from arrayfire/examples/helloworld.
My code compiles and runs properly without arrayfire. But when I include arrayfire.h, i get the above error.

Any ideas?
Thanks in advance!
Posts: 1
Joined: Thu Feb 07, 2013 9:10 am

Re: Error compiling own project with arrayfire

Postby vishy » Fri Feb 08, 2013 4:56 pm


I believe we covered this issue when you made the support request. Do let us know by the same email thread if you managed to resolve those issues.
Vish Venugopalakrishnan
Software Engineer (Q/A)
AccelerEyes LLC

Getting Started, FAQ, Tips, Syntax
User avatar
Posts: 411
Joined: Thu Apr 16, 2009 11:46 am

Return to [archive-commercial] Download & Installation