Quantcast
Channel: Intel® Software - OpenCL*
Viewing all articles
Browse latest Browse all 1182

OpenCL 2.0 + MinGW + C++ bindings

$
0
0

Hi all,

I'm using Intel and NVIDIA OpenCL using the C++ bindings under Windows 7 64-bit with Intel Xeon 2687 CPU's using the MinGW compiler. It worked like a charm. However, after installing the latest Intel OpenCL 2.0 the program compiles without errors, just some warnings from deprecated declarations, but then stops working at the first OpenCL statement that collects platform info. I eventually managed to get it working again compiling from the Visual Studio 2012 command line using the 'cl' compiler. My programs are relatively small and I like to write them outside of an IDE and then compile them using a makefile. This makes it straightforward to me to copy and compile on a different operating system. A minimal code to reproduce the error is this:

 

// Get device and platform
    std::vector<cl::Platform> platforms;
    std::vector<cl::Device> devices, device;
//    cl::Device device;
    cl::Platform platform;
    std::string devicename;
    cl::Platform::get(&platforms);

The program stops on the last statement. It would be nice to get it working under MinGW again. Is this possible?

Many thanks and best wishes!


Viewing all articles
Browse latest Browse all 1182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>