A few questions about this configuration... I'm trying to compile Boost 1.28.0 using Borland C++ 5.5.1 with the STLPort 4.5.3 STL. I get the following errors on files which include the regex/config.hpp file: libs\regex\build\../src\c_regex_traits.cpp: Error E2272 D:\Tools\Boost\boost_1_28_0\boost/regex/config.hpp 538: Identifier expected Error E2272 D:\Tools\Boost\boost_1_28_0\boost/regex/config.hpp 554: Identifier expected Error E2272 D:\Tools\Boost\boost_1_28_0\boost/regex/config.hpp 578: Identifier expected Error E2272 D:\Tools\Boost\boost_1_28_0\boost/regex/config.hpp 579: Identifier expected Error E2272 D:\Tools\Boost\boost_1_28_0\boost/regex/config.hpp 580: Identifier expected Error E2272 D:\Tools\Boost\boost_1_28_0\boost/regex/config.hpp 581: Identifier expected Error E2272 D:\Tools\Boost\boost_1_28_0\boost/regex/config.hpp 582: Identifier expected Error E2272 D:\Tools\Boost\boost_1_28_0\boost/regex/config.hpp 583: Identifier expected I believe this all has to do with the various C standard library symbols (e.g. fseek) not being "known" when placed in the using ::<symbol> construct. I've wandered through the various config.hpp files, the stuff for platform, compiler, and stdlib, etc. It would seem that the right set of stuff is being picked but there's some unexpected behavior being encountered when #include-ing standard headers from STLPort via Borland. Any ideas on correcting this? Other, somewhat related, questions: If I build w/o STLPort, things seem OK. The regex static libraries are placed in a "runtime-link-dynamic" directory. Threads, on the other hand, has that directory as well as a "runtime-link-static" directory variation. Does the directory name imply which version of the compiler's RTL is required when linking w/ that version of the Boost library? And is there a reason that regex didn't have a "runtime-link-static" directory and associated static library created? I want to statically link the RTL and boost w/ my app. Finally, how do I go about creating just a single boost library (so I can try building threads w/ STLPort w/o encountering the regex errors). Many thanks, Donnie
I'm trying to compile Boost 1.28.0 using Borland C++ 5.5.1 with the STLPort 4.5.3 STL. I get the following errors on files which include the regex/config.hpp file:
OK, I've had to patch boost/config/stdlib/stlport.hpp to support that configuration, modified source is in the cvs as usual (I've attached it to this mail as well).
If I build w/o STLPort, things seem OK. The regex static libraries are placed in a "runtime-link-dynamic" directory. Threads, on the other hand, has that directory as well as a "runtime-link-static" directory variation. Does the directory name imply which version of the compiler's RTL is required when linking w/ that version of the Boost library? And is there a reason that regex didn't have a "runtime-link-static" directory and associated static library created? I want to statically link the RTL and boost w/ my app.
Yes, "runtime-link-static" means the dll C-runtime and runtime-link-static means the static C-runtime. The latter isn't built by default by the Jamfiles (although it is by the supplied makefiles for regex -- I would recommend that you use these if you can with C++ Builder as it makes linking easier- see the regex introductory docs). If you want to use Jam then there should be a command line option to pass to Jam to get it to build static runtime versions (you will want to turn on threading support as well if you are using the MT-runtime) but I'm not familiar enough with Jam to be able to just tell you what it is.
Finally, how do I go about creating just a single boost library (so I can try building threads w/ STLPort w/o encountering the regex errors).
Isn't that what you have now - thread lib built and ready to go? John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm [Non-text portions of this message have been removed]
OK, I've had to patch boost/config/stdlib/stlport.hpp to support
John, Thanks for the prompt response and mods. See below for follow-ups... that
configuration, modified source is in the cvs as usual (I've attached it to this mail as well).
Yes, "runtime-link-static" means the dll C-runtime and runtime-link- static means the static C-runtime. The latter isn't built by default by
Jamfiles (although it is by the supplied makefiles for regex -- I would recommend that you use these if you can with C++ Builder as it makes linking easier- see the regex introductory docs). If you want to use Jam
I grabbed the file and did a build using bjam. Interestingly, the debug builds for both DLL and static versions worked (in "runtime- link-dynamic"). However, the release builds failed. There were numerous errors of the form: 'strcmp' is not a member of '_STL' in function _fastcall c_traits_base::do_lookup_class(const char *) 'strcpy' is not a member of '_STL' in function _fastcall c_traits_base::set_message_catalogue(const _STL::string &) It seemed to always be strcmp and strcpy in numerous regex functions. the then there
should be a command line option to pass to Jam to get it to build static runtime versions (you will want to turn on threading support as well if you are using the MT-runtime) but I'm not familiar enough with Jam to be able to just tell you what it is.
I attempted to do a build of regex using "make -f bcb5.mak", but it
stopped immediately in c_regex_traits.cpp w/ errors from Borland's
Isn't that what you have now - thread lib built and ready to go?
There were so many errors the first time I tried to compile stuff that I killed the build before it got to threads. Now that it almost works for regex, I'm running into errors compiling threads. I'll put up a different post for that if I need to. :) Thanks again, Donnie
I grabbed the file and did a build using bjam. Interestingly, the debug builds for both DLL and static versions worked (in "runtime- link-dynamic"). However, the release builds failed. There were numerous errors of the form:
'strcmp' is not a member of '_STL' in function _fastcall c_traits_base::do_lookup_class(const char *) 'strcpy' is not a member of '_STL' in function _fastcall c_traits_base::set_message_catalogue(const _STL::string &)
It seemed to always be strcmp and strcpy in numerous regex
functions. I believe I've successfully created release builds now (runtime-link- dynamic only still). In an stlport file, stlport/using/cstring, the "using" statements for strcpy and strcmp are surrounded by #if ! defined(strcpy/strcmp) macros. For whatever reason, in the debug build, these strcpy/strcmp are not #defined, so the using brings them into scope, and regex builds; but in release mode, they are #defined, so the using statements aren't part of the compile, causing the compile time errors in regex. My hack to fix this was to put: # if defined (__BORLANDC__) && defined(strcmp) # undef strcmp #endif just before the #if !defined(strcpy/strcmp) lines. Unfortunately, I haven't had much luck figuring out how bjam's magic works; so I can't yet tell why this behaves the way it does w/ regex to see if I can define a macro or some such at build time to correct it rather than hacking the STLPort sources.
I attempted to do a build of regex using "make -f bcb5.mak", but it stopped immediately in c_regex_traits.cpp w/ errors from Borland's
file saying things like "_chartype", "_lower", "isascii", etc. are not members of _STL; e.g. ../src/c_regex_traits.cpp: Error E2316 c:\borland\bcc55\bin\..\include\ctype.h
204: '_chartype'
is not a member of '_STL'
I'll try to figure out what the right Jam hoops are to get the build I want, that is, a regex static library compiled to expect the Borland static, multi-threaded runtime library.
Isn't that what you have now - thread lib built and ready to go?
There were so many errors the first time I tried to compile stuff that I killed the build before it got to threads. Now that it almost works for regex, I'm running into errors compiling threads. I'll
Still no luck on this front. If anyone can give me a pointer on how to get a runtime-link-static build of regex, that would be great! put
up a different post for that if I need to. :)
I posted a message about this problem. No response yet. :( Thanks again, Donnie
I believe I've successfully created release builds now (runtime-link- dynamic only still). In an stlport file, stlport/using/cstring, the "using" statements for strcpy and strcmp are surrounded by #if ! defined(strcpy/strcmp) macros. For whatever reason, in the debug build, these strcpy/strcmp are not #defined, so the using brings them into scope, and regex builds; but in release mode, they are #defined, so the using statements aren't part of the compile, causing the compile time errors in regex.
My hack to fix this was to put:
# if defined (__BORLANDC__) && defined(strcmp) # undef strcmp #endif
just before the #if !defined(strcpy/strcmp) lines. Unfortunately, I haven't had much luck figuring out how bjam's magic works; so I can't yet tell why this behaves the way it does w/ regex to see if I can define a macro or some such at build time to correct it rather than hacking the STLPort sources.
OK, I've patched boost's config again to work around this (updated file attached).
I attempted to do a build of regex using "make -f bcb5.mak", but it stopped immediately in c_regex_traits.cpp w/ errors from Borland's
file saying things like "_chartype", "_lower", "isascii", etc. are not members of _STL; e.g. ../src/c_regex_traits.cpp: Error E2316 c:\borland\bcc55\bin\..\include\ctype.h
204: '_chartype'
is not a member of '_STL'
I'll try to figure out what the right Jam hoops are to get the build I want, that is, a regex static library compiled to expect the Borland static, multi-threaded runtime library.
Still no luck on this front. If anyone can give me a pointer on how to get a runtime-link-static build of regex, that would be great!
Well you could just build from the IDE, alternatively I've got the makefile working: open up bcb5.mak and add: INCLUDES=-Ie:\STLport-4.5.3\stlport and: XLFLAGS=-Le:\STLport-4.5.3\lib obviously using whatever path your STLport build is in place of mine. John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm [Non-text portions of this message have been removed]
--- In Boost-Users@y..., "John Maddock"
OK, I've patched boost's config again to work around this (updated file attached).
The release stuff using bjam built flawlessly with this patch - thanks!.
Well you could just build from the IDE, alternatively I've got the makefile working: open up bcb5.mak and add:
INCLUDES=-Ie:\STLport-4.5.3\stlport
and:
XLFLAGS=-Le:\STLport-4.5.3\lib
obviously using whatever path your STLport build is in place of mine.
I only have the command line tools, no IDE. The make seemed to work. In terms of target names, is "boost_regex_bcb5_mss.lib" the multithreaded statically linkable library which expects to be linked with the static version of the RTL? Thanks again, Donnie
I only have the command line tools, no IDE. The make seemed to work. In terms of target names, is "boost_regex_bcb5_mss.lib" the multithreaded statically linkable library which expects to be linked with the static version of the RTL?
Yes, you don't have to link specifically to it, provided you don't define BOOST_REGEX_NO_LIB when compiling the regex headers will select the right lib to link to based on your compiler options. John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm
participants (2)
-
adhalejr
-
John Maddock