tags:

views:

83

answers:

2

Hi, i've been writing some OpenCL code lately on linux (ubuntu 10.4, ati catalyst 10.4 and ati sdk v2.1) and its working great on linux.

When i wanted to run my code on windows, i got program build errors complaining about

"this declaration has no storage class or type specifier"

and then "global variable must be declared in addrSapce constant"

even having a void kernel doesn't do, hell i commented the code and it still gave same errors lol!

weird enough that samples r working just fine. when i copied my code into the samples projects, it gave same errors.

i'm using windows 7 32-bit, ati stream sdk v2.1 and v10.6 drivers (cause i couldn't find the 10.4 for windows anywhere, which is sad since 10.6 doesn't have a guarantee to support OpenCL, way to go amd lol! )

i cut all the kernels out and left just this one, i still got same errors, here it is

__kernel void set_float( __global float* buff ,
                                   float v) { 
            buff[get_global_id(0)]=v;
}
A: 

It works for me (successfully compiled using AMD Stream Kernel Analyzer). On Win7 64-bit, sdk v2.1 and v10.6 drivers. Your formatting is horrible though.

Stringer Bell
oO i can't seem to find what u edited though... and anyway yes it compiled on the stream kernel analyzer for me too (the code is clearly correct), it just won't compile when running from the visual studio :S
OSaad
+1  A: 

Man, no matter how many times u get bitten by strings, one never learns.

It was just a non-null terminated string problem lol.

OSaad