regex compile problem with vc6 and stlport
I am using MSVC6 (sp5) with STLport v4.5.3 and attempting to compile boost::regex v3.31, as far as I know these are the latest versions/updates. I dutifully followed the installation instructions, but `nmake -fvc6-stlport.mak` died with the error: ../src/cpp_regex_traits.cpp(662) : error C2660: 'isspace' function does not take 2 parameters By building the files in the IDE, I was able to figure out why the isspace error happens: there is a global scope isspace() defined in ctype.h. The isspace problem can be fixed by defining BOOST_REGEX_STD to be std:: (in other words, getting rid of the old STLport isspace workaround). But with that done, I now get a number of linking errors when I try to build the library using nmake (though I have been able to compile .dlls via the IDE). By manually adding stlport_vc6.lib to the list of linked libraries, I can get rid of all reported linking errors, but the dll's are still failing to compile. Has anyone else using STLport v4.5.3 and regex 3.31 (boost dist 1.30.2) gotten the library to compile under MSVC6? At this point I may try compiling the dlls by hand through the IDE, but it seems like there ought to be a way to get nmake working... Thanks, Sven PS- I should probably admit that this is my first time trying to compile regex using STLport, so it's quite possible that there is some silly little thing that I am doing wrong... I have tried setting the include and lib paths both manually and using the STLPORT_PATH environment variable (C:\STLport-4.5.3 in my case), and I get the same results either way.
I am using MSVC6 (sp5) with STLport v4.5.3 and attempting to compile boost::regex v3.31, as far as I know these are the latest versions/updates.
I dutifully followed the installation instructions, but `nmake -fvc6-stlport.mak` died with the error: ../src/cpp_regex_traits.cpp(662) : error C2660: 'isspace' function does not take 2 parameters
I can reproduce that with the last release - however the current cvs version does not have the same issue - I'll try and find a patch for the last release as well, John.
Has anyone else using STLport v4.5.3 and regex 3.31 (boost dist 1.30.2) gotten the library to compile under MSVC6? At this point I may try compiling the dlls by hand through the IDE, but it seems like there ought to be a way to get nmake working...
OK here's a patch that is tested and works: Index: cpp_regex_traits.cpp =================================================================== RCS file: /cvsroot/boost/boost/libs/regex/src/cpp_regex_traits.cpp,v retrieving revision 1.30.4.1 diff -r1.30.4.1 cpp_regex_traits.cpp 257c257 < #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) ---
#if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && !defined(BOOST_MSVC) 258a259 using stlport::isspace;
I'll commit the changes to the last release branch as well, in case we do another release patch John.
"John Maddock"
Has anyone else using STLport v4.5.3 and regex 3.31 (boost dist 1.30.2) gotten the library to compile under MSVC6? At this point I may try compiling the dlls by hand through the IDE, but it seems like there ought to be a way to get nmake working...
OK here's a patch that is tested and works:
Index: cpp_regex_traits.cpp =================================================================== RCS file: /cvsroot/boost/boost/libs/regex/src/cpp_regex_traits.cpp,v retrieving revision 1.30.4.1 diff -r1.30.4.1 cpp_regex_traits.cpp 257c257 < #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) ---
#if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && !defined(BOOST_MSVC) 258a259 using stlport::isspace;
I'll commit the changes to the last release branch as well, in case we do another release patch
I don't know much about the context here, but: any check for BOOST_MSVC without a version number check (using BOOST_WORKAROUND, please) is probably wrong. Could you double-check this before applying the patch, John? Thanks, -- Dave Abrahams Boost Consulting www.boost-consulting.com
I don't know much about the context here, but: any check for BOOST_MSVC without a version number check (using BOOST_WORKAROUND, please) is probably wrong. Could you double-check this before applying the patch, John?
The #if branch is a workaround that is not required for any msvc version, so it's right IMO. John.
participants (3)
-
David Abrahams
-
John Maddock
-
Sven Olsen