Intel INDE and Visual Studio 2012 express edition unresolved LNK2019 error

Hi all,

I’ve installed Visual Studio 2012 express edition under Windows7 64-bit and installed Intel INDE Starter edition with code_builder_5.1.0.25.
Next I opened a Visual Studio x64 command prompt, which points initially to “C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC”, changed
directory to “C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC” and ran VCVARSALL.BAT. Without this it would not find <iostream> etc.

When I try to compile my OpenCL program, which is based on cl.hpp, using the command line:

cl -o myprog.exe -O2 myprog.cpp -I"C:\Intel\INDE\code_builder_5.1.0.25\include" “C:\Intel\INDE\code_builder_5.1.0.25\lib\x64\OpenCL.lib”

There are lots of errors of the kind:

myprog.obj : error LNK2019: unresolved external symbol _clGetPlatformIDs@12 referenced in function “public: static int __cdecl cl::Platform::get
(class std::vector<class cl::Platform, class std::allocator<class cl::Platform> > *)” (?get@Platform@cl@@SAHPAV?$vector@VPlatform@cl$allocator@VPlatform@cstd@@@std@@@|)

and another 23 of this kind.

Can you please help?

Many thanks!

It might be, you are linking x64 lib to a x32 application. I’m not sure what are the right parameters to make it x64, but you should try “C:\Intel\INDE\code_builder_5.1.0.25\lib\x32\OpenC L.lib” first. Or simply create a VS project and build it as x64.