I’m trying to compile some of the examples in the OpenCL sdk in Visual Studio 2010 using the x64 compiler. I’m getting unresolved external symbol errors for functions xRan, xLen, and _Locinfo_ctor:
1>------ Rebuild All started: Project: oclReduction, Configuration: Release x64 ------
1>Build started 12/9/2009 4:23:33 PM.
1>_PrepareForClean:
1> Deleting file "Release\oclReduction.lastbuildstate".
1>_PrepareForBuild:
1> Touching "Release\oclReduction.unsuccessfulbuild".
1>ClCompile:
1> oclReduction.cpp
1> Note: including windows.h
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(326): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
1> Note: including lib: glut32.lib
1>
1> Note: including stdio.h
1> Note: including math.h
1> Note: including rendercheckGL.h
1> Note: including shrUtils.h
1> Note: including cl.h
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(935,5): warning MSB8012: TargetPath(C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK\OpenCL\src\oclReduction\..\..\bin\Win64\Release\oclReduction.exe) does not match the Linker's OutputFile property value (C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK\OpenCL\bin\Win64\Release\oclReduction.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>oclUtils64.lib(shrUtils.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned __int64,unsigned __int64)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0@Z)
1>oclUtils64.lib(oclUtils.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ)
1>oclUtils64.lib(cmd_arg_reader.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ)
1>oclUtils64.lib(shrUtils.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::append(char const *,unsigned __int64)" (?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z)
1>oclUtils64.lib(oclUtils.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ)
1>oclUtils64.lib(cmd_arg_reader.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ)
1>oclUtils64.lib(shrUtils.obj) : error LNK2019: 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) referenced in function "public: __cdecl std::_Locinfo::_Locinfo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
1>oclUtils64.lib(cmd_arg_reader.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)
1>..\..\bin\Win64\Release\oclReduction.exe : fatal error LNK1120: 3 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.90
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
This project was converted over to msvs10 beta 2 from the msvs9 project provided in the sdk.