Article View: borland.public.cppbuilder.migration
Article #19Re: Tied up with string
From: Ed Mulroy
Date: Fri, 05 Aug 2005 22:11
Date: Fri, 05 Aug 2005 22:11
70 lines
3297 bytes
3297 bytes
BCB 3 is from way back before the C++ Language specification was revised. BCB 5 is newer. Did you forget the 'std::' as in std::string s = "abc"; . Ed > johnp wrote in message > news:42f36665@newsgroups.borland.com... > Hi > > I'm porting code from BCB3 to BCB6, which uses STL string and stream > classes. > No matter what the include file, I get either "undefined symbol 'string' " > & "undefined symbol 'ifstream' " > or (if I include oldstl/string.stl) "multiple definitions errors" > The BCB6 headers are below. The // comments are mine > > Should I be using the old Roguewave STl or SPLport ? > How do I get the correct header to load ? > what is macro def "__cplusplus" all about > > #if !defined(__cplusplus) > # include <_str.h> //'C' > string functions, no string class defs > # else /* __cplusplus */ > # include <_str.h> > # if defined(__USING_STD_NAMES__) > # ifdef _USE_OLD_RW_STL > # include <oldstl/string.stl> // stub > redirector for _str.h or oldstl/string.stl > # else > # include <stlport/string> //see > below > # endif > # endif /* __USING_STD_NAMES__ */ > #endif > > contents of stlport/string > > # ifndef _STLP_STRING > # define _STLP_STRING > # ifndef _STLP_OUTERMOST_HEADER_ID > # define _STLP_OUTERMOST_HEADER_ID 0x68 > # include <stl/_prolog.h> //contains > no class definitions > # endif > #if defined (_STLP_USE_NATIVE_STRING) . > # if defined (_STLP_MSVC) > # include <streambuf> > # include <istream> > # endif > # include _STLP_NATIVE_HEADER(string) > # endif /* _STLP_USE_NATIVE_STRING */ > # if !defined (_STLP_USE_NATIVE_STRING) || defined > (_STLP_USE_OWN_NAMESPACE) > # include <stl/_string.h> //Standard C++ string class. Including this file > gives "undefined symbol 'string'" > # else > # include <stl/_string_hash.h> //no class > definitions > # endif /*_STLP_USE_NATIVE_STRING */ > // cleanup > # if (_STLP_OUTERMOST_HEADER_ID == 0x68) > # include <stl/_epilog.h> > # undef _STLP_OUTERMOST_HEADER_ID > # endif > #endif /* _STLP_STRING */
Technical Details
Message-ID:
<42f3e415$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.multikabel.nl!amsnews01.chello.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42f36665@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 110f51,eef77799fd248bf0 X-Google-Attributes: gid110f51,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Ed Mulroy" <dont_email_me@bitbuc.ket> Newsgroups: borland.public.cppbuilder.migration References: <42f36665@newsgroups.borland.com> Subject: Re: Tied up with string Date: Fri, 5 Aug 2005 18:11:34 -0400 Lines: 72 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 69.134.170.196 Message-ID: <42f3e415$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1123279893 69.134.170.196 (5 Aug 2005 15:11:33 -0700) X-Authenticated-User: edmulroy Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.multikabel.nl!amsnews01.chello.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail