search
Twitter Rss Feeds
MicrosoftArticlesForumsGroups
C# .NET
VB.NET
Visual Studio .NET
ADO.NET
Xml/Xslt
VB 6.0
.NET CF
GDI+
LINQ
Deployment
Security
FoxPro
Silverlight / WPF
Entity Framework
RIA Services

Web ProgrammingArticlesForumsGroups
JavaScript
ASP
ASP.NET
Web Services

Non-MicrosoftArticlesForumsGroups
NHibernate
Perl
PHP
Ruby
Java
Linux / Unix
Apple
Open Source

DatabasesArticlesForumsGroups
SQL Server
Access
Oracle
MySQL
Other Databases

OfficeArticlesForumsGroups
Microsoft Excel
Microsoft Word
Microsoft Powerpoint
Publisher
Money

Operating SystemsArticlesForumsGroups
Windows 7
Windows Server
Windows Vista
Windows XP
Windows Update
MAC
Linux / UNIX

Server PlatformsArticlesForumsGroups
Share Point
BizTalk
Site Server
Exhange Server
IIS
Transaction Server

Graphic DesignArticlesForumsGroups
Macromedia Flash
Adobe PhotoShop
Microsoft Expression

OtherArticlesForumsGroups
Subversion / CVS
Ask Dr. Dotnetsky
Active Directory
Networking
Uninstall Virus
Job Openings
Reviews
Search Engines
Resumes

 

Previous Thread:   @deprecated in C++: anything better than #pragma message( "Warning

1/10/2006 10:08:58 AM    libcp.lib from PSDK version 3790.1830 incompatible with STL on VC++ 2003
I'm not sure if this is a bug or a known incompatibility.  I haven't  
  
been able to find authoritative information via search engine.  This  
  
bit of info may provide some help to other wayward souls who are  
  
running Visual C++ 2003 with the April 2005 SDK installed.  
  
Microsoft C++ Compiler Version: 13.10.3077 for 80x86 (Visual Studio  
  
..NET 2003)  
  
Microsoft Incremental Linker Version: 7.10.3077 (Visual Studio .NET  
  
2003)  
  
Microsoft Platform SDK Version: 3790.1830 (April 2005)  
  
In trying to compile some C++ code that uses an STL queue, I  
  
encountered linker errors, which can be reproduced using the sample  
  
code for queue.cpp in the Visual C++ help:  
  
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vcstdlib/html/vcsampSamplequeuefunctionsSTLSample.htm  
  
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcstdlib/html/vcoriStandardTemplateLibrarySamples.asp  
  
When compiled as a Win32 Console Project under Release mode, the  
  
program produces the following error messages:  
  
queue.obj : error LNK2019: unresolved external symbol "public: void  
  
__thiscall std::_String_base::_Xran(void)const "  
  
(?_Xran@_String_base@std@@QBEXXZ) referenced in function "public: class  
  
std::basic_string<char,struct std::char_traits<char>,class  
  
std::allocator<char> > & __thiscall std::basic_string<char,struct  
  
std::char_traits<char>,class std::allocator<char> >::erase(unsigned  
  
int,unsigned int)"  
  
(?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z)  
  
queue.obj : error LNK2019: unresolved external symbol "public: void  
  
__thiscall std::locale::facet::_Register(void)"  
  
(?_Register@facet@locale@std@@QAEXXZ) referenced in function "class  
  
std::num_put<char,class std::ostreambuf_iterator<char,struct  
  
std::char_traits<char> > > const & __cdecl std::use_facet<class  
  
std::num_put<char,class std::ostreambuf_iterator<char,struct  
  
std::char_traits<char> > > >(class std::locale const &)"  
  
(??$use_facet@V?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@@std@@YAABV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@0@ABVlocale@0@@Z)  
  
queue.obj : error LNK2019: unresolved external symbol "public: class  
  
std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned  
  
int)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z) referenced in  
  
function "class std::num_put<char,class  
  
std::ostreambuf_iterator<char,struct std::char_traits<char> > > const &  
  
__cdecl std::use_facet<class std::num_put<char,class  
  
std::ostreambuf_iterator<char,struct std::char_traits<char> > > >(class  
  
std::locale const &)"  
  
(??$use_facet@V?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@@std@@YAABV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@0@ABVlocale@0@@Z)  
  
queue.obj : error LNK2019: unresolved external symbol "public: void  
  
__thiscall std::_String_base::_Xlen(void)const "  
  
(?_Xlen@_String_base@std@@QBEXXZ) referenced in function "protected:  
  
bool __thiscall std::basic_string<char,struct  
  
std::char_traits<char>,class std::allocator<char> >::_Grow(unsigned  
  
int,bool)"  
  
(?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z)  
  
The problem is caused by attempting to link against the version of  
  
libcp.lib in the latest Microsoft Platform SDK.  
  
After adding the linker option /VERBOSE:LIB to the build, one can see  
  
that the linker is picking up the SDK version of the library just prior  
  
to the linker error message:  
  
Searching C:\Program Files\Microsoft Platform SDK\lib\libcp.lib  
  
If you do a DUMPBIN /ALL for libcp.lib in the SDK versus the one the  
  
ships with Visual C++ .NET 2003, you'll find that the symbols are  
  
decorated differently.  For example, in the the case of _Xran():  
  
VC++7: ?_Xran@_String_base@std@@QBEXXZ (public: void __thiscall  
  
std::_String_base::_Xran(void)const )  
  
PSDK: ?_Xran@std@@YAXXZ (void __cdecl std::_Xran(void))  
  
Additionally, If one removes the copy of libcp.lib from the platform  
  
SDK directory so that the linker does not find it, the linker finds the  
  
Visual C++ .NET 2003 version and completes successfully.  The sample  
  
program executes as expected.  
  
--  
  
P.J. Hinton

1/12/2006 12:43:05 PM    Re: libcp.lib from PSDK version 3790.1830 incompatible with STL on VC++ 2003
Same here, I am using free VC toolkit.  
  
PSDK ships with the version of libcp.lib which conflicts with  
  
headers/libs included in VC. Interestingly enough, no MT or debug  
  
versions of this lib is shipped with PSDK (such as libcpd.lib or  
  
libcpmt*.lib).  
  
This clearly indicates a bug in PSDK distribution. I was unable to find  
  
any info on this in KB either.  
  
Apart from deleting the library from PSDK directory, this can be worked  
  
around by compiling/linking against MT version of the library, i.e.  
  
using /MT switch. Either way, it can get quite annoying when one has  
  
large code base affected, and/or many machines involved in the builds.  
  
Cheers,  
  
Boris Kropivnitsky  
  
NowhereDifferentiable@gmail.com wrote:


Pete's Blog   |    Pete's Resume   |    Robbe's Blog   |    Robbe's Resume   |    Archive #2   |    Archive #3   |    Dotnetslackers   |    XmlPitStop   |    Advertise   |   Contact Us   |   Privacy   |   Copyright (c) 2000 - 2009 eggheadcafe.com  All rights reserved.