|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2000-09-13 14:53:25
I'm trying to use it with VC6sp3 on Windows 2000.
I'm excited to see it work!
------
First, a remark on the code: it's full of long functions with many levels of
nesting and many switch statements. I recognize that regular language
interpreters are a special breed, but this reminds me of the bad-old-days of
'C' programming, before I learned to break things down into digestible
pieces. I find the "big monolithic function" style of programming leads to
maintainance and readability problems. Does it have to be this way?
----------
Trying to build the library using vc6.bat causes problems. First of all,
since none of the objects or libs exists initially, I get:
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
del *.obj
Could Not Find c:\prj\manhattan\inc\alien\libs\regex\lib\*.obj
NMAKE : fatal error U1077: 'del' : return code '0x1'
Stop.
Then, if I just delete all of those "del" commands, I still have a problem:
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
nmake -fvc6lib.mak CFG="Release" LIBNAME=mre200
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
Warning: cannot find "mre200.dep"
cl.exe /nologo /ML /W3 /GX /O2 /I..\..\..\ /D BOOST_RE_LOCALE_W32 /D
"WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /Fp".\mre200.pch" /YX /Fo".\\"
/Fd".\mre200" /FD /c ..\src\re_psx.cpp
re_psx.cpp
cl.exe /nologo /ML /W3 /GX /O2 /I..\..\..\ /D BOOST_RE_LOCALE_W32 /D
"WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /Fp".\mre200.pch" /YX /Fo".\\"
/Fd".\mre200" /FD /c ..\src\re_psxw.cpp
re_psxw.cpp
cl.exe /nologo /ML /W3 /GX /O2 /I..\..\..\ /D BOOST_RE_LOCALE_W32 /D
"WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /Fp".\mre200.pch" /YX /Fo".\\"
/Fd".\mre200" /FD /c ..\src\re_thrd.cpp
re_thrd.cpp
cl.exe /nologo /ML /W3 /GX /O2 /I..\..\..\ /D BOOST_RE_LOCALE_W32 /D
"WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /Fp".\mre200.pch" /YX /Fo".\\"
/Fd".\mre200" /FD /c ..\src\regex.cpp
regex.cpp
cl.exe /nologo /ML /W3 /GX /O2 /I..\..\..\ /D BOOST_RE_LOCALE_W32 /D
"WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /Fp".\mre200.pch" /YX /Fo".\\"
/Fd".\mre200" /FD /c ..\src\fileiter.cpp
fileiter.cpp
cl.exe /nologo /ML /W3 /GX /O2 /I..\..\..\ /D BOOST_RE_LOCALE_W32 /D
"WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /Fp".\mre200.pch" /YX /Fo".\\"
/Fd".\mre200" /FD /c ..\src\cregex.cpp
cregex.cpp
cl.exe /nologo /ML /W3 /GX /O2 /I..\..\..\ /D BOOST_RE_LOCALE_W32 /D
"WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /Fp".\mre200.pch" /YX /Fo".\\"
/Fd".\mre200" /FD /c ..\src\c_regex_traits.cpp
c_regex_traits.cpp
cl.exe /nologo /ML /W3 /GX /O2 /I..\..\..\ /D BOOST_RE_LOCALE_W32 /D
"WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /Fp".\mre200.pch" /YX /Fo".\\"
/Fd".\mre200" /FD /c ..\src\cpp_regex_traits.cpp
cpp_regex_traits.cpp
cl.exe /nologo /ML /W3 /GX /O2 /I..\..\..\ /D BOOST_RE_LOCALE_W32 /D
"WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /Fp".\mre200.pch" /YX /Fo".\\"
/Fd".\mre200" /FD /c ..\src\w32_regex_traits.cpp
w32_regex_traits.cpp
cl.exe /nologo /ML /W3 /GX /O2 /I..\..\..\ /D BOOST_RE_LOCALE_W32 /D
"WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /Fp".\mre200.pch" /YX /Fo".\\"
/Fd".\mre200" /FD /c ..\src\c_regex_traits_common.cpp
c_regex_traits_common.cpp
link.exe -lib @C:\DOCUME~1\DAVIDA~1\LOCALS~1\Temp\nma01248.
copy "mre200.lib" "C:\tools\msvc6\VC98\lib\mre200.lib"
1 file(s) copied.
nmake -fvc6lib.mak CFG="Release" LIBNAME=mre200m MULTITHREAD="1"
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
Warning: cannot find "mre200m.dep"
link.exe -lib @C:\DOCUME~1\DAVIDA~1\LOCALS~1\Temp\nma01368.
copy "mre200m.lib" "C:\tools\msvc6\VC98\lib\mre200m.lib"
1 file(s) copied.
nmake -fvc6lib.mak CFG="Debug" LIBNAME=mre200d
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
Warning: cannot find "mre200d.dep"
link.exe -lib @C:\DOCUME~1\DAVIDA~1\LOCALS~1\Temp\nma01248.
copy "mre200d.lib" "C:\tools\msvc6\VC98\lib\mre200d.lib"
1 file(s) copied.
copy "mre200d.pdb" "C:\tools\msvc6\VC98\lib\mre200d.pdb"
The system cannot find the file specified.
NMAKE : fatal error U1077: 'copy' : return code '0x1'
Stop.
NMAKE : fatal error U1077: 'C:\tools\msvc6\VC98\BIN\NMAKE.EXE' : return code
'0x2'
Stop.
--------
I just ended up running the line I needed from vc6.mak:
nmake -fvc6lib.mak CFG="Debug" LIBNAME=mre200dm MULTITHREAD="1"
but YIKES! it copies the library right into my vc6 installation! Am I wrong
to be surprised, even worried?
--------
Then, there are some warnings I get from vc6. It's just wrong in most cases,
but here are the fixes:
*** c:/temp/detail/boost/detail/jm_cfg.hpp Mon Aug 7 11:09:14 2000
--- c:/prj/manhattan/inc/alien/boost/detail/jm_cfg.hpp Wed Sep 13 15:04:24
2000
***************
*** 726,740 ****
inline void BOOST_RE_CALL jm_destroy(T* t)
{
t->~T();
}
! inline void BOOST_RE_CALL jm_destroy(char* t){}
! inline void BOOST_RE_CALL jm_destroy(short* t){}
! inline void BOOST_RE_CALL jm_destroy(unsigned short* t){}
! inline void BOOST_RE_CALL jm_destroy(int* t){}
! inline void BOOST_RE_CALL jm_destroy(unsigned int* t){}
! inline void BOOST_RE_CALL jm_destroy(long* t){}
! inline void BOOST_RE_CALL jm_destroy(unsigned long* t){}
template <class T>
--- 726,742 ----
inline void BOOST_RE_CALL jm_destroy(T* t)
{
t->~T();
+ (void)t; // suppress incorrect MSVC compiler warning
}
! // dwa 9/13/00 - remove unused argument names to suppress compiler
warnings
! inline void BOOST_RE_CALL jm_destroy(char*){}
! inline void BOOST_RE_CALL jm_destroy(short*){}
! inline void BOOST_RE_CALL jm_destroy(unsigned short*){}
! inline void BOOST_RE_CALL jm_destroy(int*){}
! inline void BOOST_RE_CALL jm_destroy(unsigned int*){}
! inline void BOOST_RE_CALL jm_destroy(long*){}
! inline void BOOST_RE_CALL jm_destroy(unsigned long*){}
template <class T>
*** c:/temp/detail/boost/detail/regmatch.hpp Mon Aug 7 11:09:14 2000
--- c:/prj/manhattan/inc/alien/boost/detail/regmatch.hpp Wed Sep 13 15:06:46
2000
***************
*** 50,55 ****
--- 50,58 ----
typedef typename traits_type::string_type traits_string_type;
const traits_type& traits_inst = e.get_traits();
+ // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is
never
+ // referenced
+ (void)traits_inst;
// try and match a single character, could be a multi-character
// collating element...
***************
*** 291,296 ****
--- 294,302 ----
*restart = first;
iterator base = first;
const traits& traits_inst = e.get_traits();
+ // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is
never
+ // referenced
+ (void)traits_inst;
// prepare m for failure:
/*
***************
*** 1057,1062 ****
--- 1063,1071 ----
I base = first;
bool need_init;
const traits& traits_inst = e.get_traits();
+ // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is
never
+ // referenced
+ (void)traits_inst;
flags |= match_init;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk