How DerelictCL works

bioinfornatics bioinfornatics at fedoraproject.org
Tue Jul 21 12:00:03 UTC 2020


Dear,

I would like to use OpenCL in D. Thus I try to use DerelictCL.
But I fail to use it I encounter this error message:
--------------
/opt/jonathan/jonathan-dlang_ldc2092/root/usr/include/d/derelict/opencl/constants.di(835): Error: genCLVectorTypes cannot be interpreted at compile time, because it has no available source code
/opt/jonathan/jonathan-dlang_ldc2092/root/usr/include/d/derelict/opencl/constants.di-mixin-835(835): Error: declaration expected, not <
--------------


The tiny D file is:
------test_opencl.d--------

import derelict.opencl.cl;

void main() {
     // Load the OpenCL library.
     DerelictCL.load();
}
---------------------------


The compile line is:

--------------
ldc2  -I /opt/jonathan/jonathan-dlang_ldc2092/root/usr/include/d/ 
\
       -L-L/usr/lib64 \
       -L-L/opt/jonathan/jonathan-dlang_ldc2092/root/usr/lib64 \
       -L-lOpenCL \
       -L-lDerelictUtil \
       -L-lDerelictCL \
       -of test \
       test_opencl.d
--------------

library are located at:
OpenL           /usr/lib64/libOpenCL.so
DerelictUtil    
/opt/jonathan/jonathan-dlang_ldc2092/root/usr/lib64/libDerelictUtil.so
DerelictCL      
/opt/jonathan/jonathan-dlang_ldc2092/root/usr/lib64/libDerelictCL.so

Derelict include files:= are located at:
  - /opt/jonathan/jonathan-dlang_ldc2092/root/usr/include/d/


Thanks for your help

Best regards






More information about the Digitalmars-d-learn mailing list