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