Hello all,
I've recently downloaded the latest stream 2.0 beta4 in order to play with OpenCL. Unfortunately, I'm encountering some problems when compiling, so I hope to find some help here.
First of all a description of my system: CPU is an Intel E6750, GPU an ATI 3870, 2GB of RAM, Windows XP SP3, and so on.
I was trying to compile a simple "Hello World" OpenCL program with Eclipse 3.5 and the GCC compiler provided by MinGW 5.16; my OS is Windows XP SP3. These are the steps I've followed in order to compile correctly:
1) Set the ATI Stream OpenCL "include" folder;
2) Set the ATI Stream OpenCL library folder (the one which contains OpenCL.lib)
3) Set the additional library to use, OpenCL.lib;
I think these are the only steps required, because if I follow what I've written above I can compile my "Hello World" without problems under MS Visual Studio 2008.
Anyway, my hello world program is simply this:
#include
int main(int argc, char *argv[]) { return(1); } |
...and these are the error messages reported in Eclipse Console:
**** Build of configuration Release for project DCIOpenCL ****
**** Internal Builder is used for build **** gcc -IC:\Programmi\ATI Stream\include -O0 -osrc\main.o ..\src\main.c In file included from ..\src\main.c:1: C:/Programmi/ATI Stream/include/CL/cl.h:62: error: syntax error before "cl_context_properties" C:/Programmi/ATI Stream/include/CL/cl.h:62: warning: data definition has no type or storage class C:/Programmi/ATI Stream/include/CL/cl.h:437: error: syntax error before '*' token C:/Programmi/ATI Stream/include/CL/cl.h:440: error: `clCreateContext' declared as function returning a function C:/Programmi/ATI Stream/include/CL/cl.h:441: error: syntax error before "void" C:/Programmi/ATI Stream/include/CL/cl.h:445: error: syntax error before '*' token C:/Programmi/ATI Stream/include/CL/cl.h:447: error: `clCreateContextFromType' declared as function returning a function C:/Programmi/ATI Stream/include/CL/cl.h:448: error: syntax error before "void" Build error occurred, build is stopped Time consumed: 62 ms. |
As you can see errors start at line 62 of cl.h, which is:
typedef intptr_t cl_context_properties; |
Any idea? Thank you for any answer!
Fr4nz