- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-
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\OpenC L.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$all ocator@VPlatform@cstd@@@std@@@|)
and another 23 of this kind.
Can you please help?
Many thanks!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It looks like there is an x86/x64 configuration mismatch. You are linking with x64 OpenCL.lib, but are you sure that x64 compiler is called? What does cl.exe prints?
Also, Im' bit confused that you basically set environment twice - first time calling VC11 command prompt, then calling VC12 VCVARSALL.BAT, which requires an argument by the way.
Thanks,
Yuri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Many thanks, Yuri. Indeed it turned out to be a compiler x86/x64 mismatch. When typing 'cl' it said it was for x86. The problem sas now been solved as follows:
1. Opened VS2013 x64 Native Tools Command Prompt.
2. Run 'vsvars64.bat'
3. Repeat compilation command from this post and that did the trick.
Thanks again,
Matthias

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page