cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Peterp
Journeyman III

Unable to compile simple OpenCL program on Windows7/64Bit with VC++2010

Hi,

I'm unable to compile a simple OpenCL program
with VC++2010. The pathes to the include and
lib dirs are set correctly and i added OpenCL.lib.
I use cl.hpp.

I get this message:

1>main.obj : error LNK2001: unresolved external symbol _clGetContextInfo@20
1>main.obj : error LNK2001: unresolved external symbol _clGetPlatformIDs@12
1>main.obj : error LNK2001: unresolved external symbol _clCreateContextFromType@24
1>main.obj : error LNK2001: unresolved external symbol _clGetPlatformInfo@20
1>main.obj : error LNK2001: unresolved external symbol _clReleaseContext@4

0 Likes
3 Replies
Peterp
Journeyman III

Now it works, I changed the libpath to $(ATISTREAMSDKROOT)/lib/x86 instead of $(ATISTREAMSDKROOT)/lib/x86_64. I thought if I have a 64Bit system i should use x86_64??

0 Likes

no. it depend if you use 64bit compiler or if set compile 64bit application.

0 Likes

A fresh install of Visual Studio (even 2010) uses 32-bit by default, so unless you've explicitly set your project to be 64-bit (in configuration manager -> platform -> x64) it will be 32-bit.

0 Likes