cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

georgebarjoud
Journeyman III

VS2005 problem compiling OpenCL examples

Problems compiling with VS2005

I'm trying to compile the OpenCL example solution in VS2005. I had to force the solution to load in VS2005, but all seemed well expect 2 linker errors. I have attached the output.

 

Thanks for any advice.

Linking... SDKUtil.lib(SDKFile.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z) SDKUtil.lib(SDKCommon.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z)

0 Likes
4 Replies
omkaranathan
Adept I

VS project files included in the SDK are of VS2008 which explains why you had to force the solution to load in VS2005. ATI Stream SDKbeta4 supports VS2008 only. You might be facing issues in other Visual Studio versions.

0 Likes

I'm using VS2008, run the NBody SDK proj, on NVIDIA TeslaC1060 card, XP 64-bit. Still these two questiones,

SDKUtil.lib(SDKCommon.obj): error LNK2019:

SDKUtil.lib(SDKFile.obj): error LNK2001

And I also run other proj Reduction, HellocCL...always link errors simlilar to the ones above. SDKUtil.lib has been set correctly, or should it be linked as DLL, not lib? But where is the DLL?

0 Likes

OK now!

My VS2008 has been installed without x64 platform, I reinstalled it and run the NBody, Reduction...

BUT I should modify a little:

clBuildProgram(program, 1, &devices[0], NULL, NULL, NULL);  to this:

clBuildProgram(program, 0, NULL, NULL, NULL, NULL);

 

Everything goes well now. BUT WHY?

0 Likes

Originally posted by: Juliet Chu

 

BUT I should modify a little:

 

clBuildProgram(program, 1, &devices[0], NULL, NULL, NULL);  to this:

 

clBuildProgram(program, 0, NULL, NULL, NULL, NULL);

 

Could you post the error message you are getting if you don't do this modification?

0 Likes