OpenCL header inclusion with relative path issue in C++

后端 未结 2 1120
抹茶落季
抹茶落季 2021-02-09 20:24

I am trying to run an OpenCL C++ sample on Eclipse CTD that (on Mac) includes the OpenCL header as follows:

#include 

The fi

2条回答
  •  误落风尘
    2021-02-09 21:06

    According to Khronos specifications link to K there is a separate file that act as a wrapper for the C++, also the ".h" at the end of the file means that probably this header is only for the C and "maybe" for the C++. Probably you can solve this reading that page.

    Anyway i found the Eclipse CDT really buggy and maybe it's worth trying to compile from the command line because the MAC OS environment really lacks of a good IDE and generally speaking it's not a good OS for developers.

    Keep in mind that the only "native" language for the MAC is the Objective-C and all the others, if present, are porting; if you plan to develop some important projects i would suggest to consider a switch to Windows or Linux because even Linux offer a better environment for the developers compared to MAC OSX.

    Edit 1: here is an example that i found, it use the binding described in the Khronos page that i just linked link 2 example

    Edit 2: you can try 2 things - re-installing the VGA drivers that usually contain the proper OpenCL SDK for you machine ( Intel also offers an SDK but it runs only on iCore CPU and some C2D ) - to compile from the command line

    But at this point your best companions could be Xcode and the online documentation for OpenCL under MAC link ( note that MAC include by default the 1.0 version of the OpenCL library ) simply because Xcode offers some better support for this kind of project under MAC and you can find a lot of tutorials on internet using this IDE.

提交回复
热议问题