🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.migration
Article #17

Tied up with string

#17
From: johnp
Date: Fri, 05 Aug 2005 13:15
58 lines
2789 bytes
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: <42f36665@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 110f51,eef77799fd248bf0,start
X-Google-Attributes: gid110f51,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "johnp" <john.pearson@NOSPAM.co.uk>
Newsgroups: borland.public.cppbuilder.migration
Subject: Tied up with string
Date: Fri, 5 Aug 2005 14:15:15 +0100
Lines: 61
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 81.1.87.209
Message-ID: <42f36665@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1123247717 81.1.87.209 (5 Aug 2005 06:15:17 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail