Compile error when build boost with vc 7 and vc 7.1
The last version of boost has got by CVS. set BOOST_ROOT=d:\boost\boost set VC7_ROOT=D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 bjam "-sTOOLS=vc7" Command line error D2016 : '/Za' and '/Ze' command-line options are incompatible -- /*******************/ ×ÔÓÉ£šliberty£©ÎÞ·ÇŸÍÊÇÕâÑùÒ»ÖÖ³Ðŵ£ºÃ¿žöÈËœ«»áµÃµœÒ»ÖÖ±£ÕÏ£¬±£ÕÏÎÒÃÇ¿ÉÒÔÓë ÈšÍþ¡¢¶àÊý¡¢Á÷Ë׌°ÓßÂÛµÄÓ°ÏìÏ࿹ºâ¡£ /*******************/
"Black Ice"
The last version of boost has got by CVS. set BOOST_ROOT=d:\boost\boost
You don't need to do this; in fact I advise against it.
set VC7_ROOT=D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 bjam "-sTOOLS=vc7"
Command line error D2016 : '/Za' and '/Ze' command-line options are incompatible
It doesn't happen for me, and in fact the toolset definitions involved (msvc-tools.jam, vc7-tools.jam) show no sign of /Za anywhere. I can't imagine what is making it show up. What command-line do you see accompanying that error? -- David Abrahams dave@boost-consulting.com * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
At 03:07 AM 12/31/2002, Black Ice wrote:
The last version of boost has got by CVS. set BOOST_ROOT=d:\boost\boost set VC7_ROOT=D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 bjam "-sTOOLS=vc7"
Command line error D2016 : '/Za' and '/Ze' command-line options are incompatible
Sounds like something in your setup is bonkers. The vc7 toolset has been problem free for a long time. For the .NET 2003 (aka 7.1) testing of the Boost libraries I did in September, I added switches /Op -Zc:wchar_t. IIRC, someone from Microsoft suggested them for the Boost libraries. --Beman
"Beman Dawes"
At 03:07 AM 12/31/2002, Black Ice wrote:
The last version of boost has got by CVS. set BOOST_ROOT=d:\boost\boost set VC7_ROOT=D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 bjam "-sTOOLS=vc7"
Command line error D2016 : '/Za' and '/Ze' command-line options are incompatible
Sounds like something in your setup is bonkers. The vc7 toolset has been problem free for a long time.
For the .NET 2003 (aka 7.1) testing of the Boost libraries I did in September, I added switches /Op -Zc:wchar_t. IIRC, someone from Microsoft suggested them for the Boost libraries.
If you use the switch you mentioned, be aware that you are compiling with C++ native wchar_t support, which is probably what you want, but that if someone else tries to use the library and does not use this switch, which means the previous VC++ typedef compatibility for wchar_t, they will fail during the link phase if you are exporting any functions which pass or return wchar_t in any way in your library. I think Boost should promote native C++ wchar_t support, but of course this will break user modules which take the default. Presently Regex++ uses the default and not the switch above. A possible solution, but one that entails more work, is to support both for VC++ with slightly different library names, one with C++ native wchar_t support and the other without. This involves more builds and more libraries distributed for VC++ but will not leave the end user in the lurch who does not match the option chosen when the library is built.
"Beman Dawes"
wrote in message news:4.3.2.7.2.20021231164805.01aa20c0@mailhost.esva.net... At 03:07 AM 12/31/2002, Black Ice wrote:
The last version of boost has got by CVS. set BOOST_ROOT=d:\boost\boost set VC7_ROOT=D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 bjam "-sTOOLS=vc7"
Command line error D2016 : '/Za' and '/Ze' command-line options are incompatible
Sounds like something in your setup is bonkers. The vc7 toolset has been problem free for a long time.
For the .NET 2003 (aka 7.1) testing of the Boost libraries I did in September, I added switches /Op -Zc:wchar_t. IIRC, someone from Microsoft suggested them for the Boost libraries.
If you use the switch you mentioned, be aware that you are compiling with C++ native wchar_t support, which is probably what you want, but that if someone else tries to use the library and does not use this switch, which means the previous VC++ typedef compatibility for wchar_t, they will fail during the link phase if you are exporting any functions which pass or return wchar_t in any way in your library.
I think Boost should promote native C++ wchar_t support, but of course
will break user modules which take the default. Presently Regex++ uses
At 09:19 PM 12/31/2002, Edward Diener wrote: this the
default and not the switch above.
A possible solution, but one that entails more work, is to support both for VC++ with slightly different library names, one with C++ native wchar_t support and the other without. This involves more builds and more
On one hand, it is a always nice if Boost libraries work with default compiler switches. OTOH, we really want to push in the direction of increased standards compliance, and that may mean requiring switches. FWIW, some people within Microsoft are pushing for the increased compliance switches like -Zc:wchar_t to become the default in the release after 7.1. libraries
distributed for VC++ but will not leave the end user in the lurch who does not match the option chosen when the library is built.
I'll leave that decision to John Maddock and the others most directly affected. --Beman
"Beman Dawes"
At 09:19 PM 12/31/2002, Edward Diener wrote: On one hand, it is a always nice if Boost libraries work with default compiler switches. OTOH, we really want to push in the direction of increased standards compliance, and that may mean requiring switches.
FWIW, some people within Microsoft are pushing for the increased compliance switches like -Zc:wchar_t to become the default in the release after 7.1.
A possible solution, but one that entails more work, is to support both for VC++ with slightly different library names, one with C++ native wchar_t support and the other without. This involves more builds and more libraries distributed for VC++ but will not leave the end user in the lurch who does not match the option chosen when the library is built.
I'll leave that decision to John Maddock and the others most directly affected.
Perhaps the decision should be made consistent throughout any Boost library exporting wchar_t functionality. A new Boost macro might be able to enforce it for VC++ 7.0 and higher throughout Boost. I am sure it would be disconcerting to end users to find that Boost implementation X, which uses wchar_t for VC++, uses it one way while Boost implementation Y, which uses wchar_t for VC++, uses it the opposite way. I too agree that the native C++ wchar_t in VC++ 7 and higher should be the default for further Boost releases. It is important that end-users are told of this change, where applicable, if it is made.
I reinstall VC 7.1 and delete boost. Then do the following works:
d:
cd boost
cvs -d:pserver:anonymous@cvs.boost.sourceforge.net:/cvsroot/boost login
[press return]
cvs -z3 -d:pserver:anonymous@cvs.boost.sourceforge.net:/cvsroot/boost
checkout boost
cvs -d:pserver:anonymous@cvs.boost.sourceforge.net:/cvsroot/boost logout
now got last version of boost
cd boost
cd tools
cd build
cd jam_src
build.bat
some message on screen:
Setting environment for using Microsoft Visual C++ tools.
###
### Using 'msvc' toolset.
###
...
now got bjam.exe
then do following work:
cd..
cd..
cd..
current directory now is d:\boost\boost
set BOOST_ROOT=D:\boost\boost
set VISUALC=C:\Program Files\Microsoft Visual C++\VC98
tools\build\jam_src\bin.ntx86\bjam "-sTOOLS=msvc"
build successfully
set VC7_ROOT=D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7
tools\build\jam_src\bin.ntx86\bjam "-sTOOLS=vc7"
some message on screen:
"cl" /Zm800 -nologo -GX -c /Z7 /Od /Ob0 /GX /GR /MTd /Op
/Zc:wchar_t,for
Scope -I"libs\thread\build" -I"D:\boost\boost" -I"C:\Program
Files\Microsoft V
isual
udio\VC98\include" -Fo"libs\thread\build\bin\libboost_thread.lib\vc7\d
ebug\runtime-link-static\threading-multi\tss.obj" -Tp"libs\thread\build\../
src\
tss.cpp"
...failed vc-C++
libs\thread\build\bin\libboost_thread.lib\vc7\debug\runtime-lin
k-static\threading-multi\tss.obj...
vc-C++
libs\thread\build\bin\libboost_thread.lib\vc7\debug\runtime-link-static\t
hreading-multi\xtime.obj
Command line error D2016 : '/Za' and '/Ze' command-line options are
incompatible
"cl" /Zm800 -nologo -GX -c /Z7 /Od /Ob0 /GX /GR /MTd /Op
/Zc:wchar_t,for
Scope -I"libs\thread\build" -I"D:\boost\boost" -I"C:\Program
Files\Microsoft V
isual
udio\VC98\include" -Fo"libs\thread\build\bin\libboost_thread.lib\vc7\d
ebug\runtime-link-static\threading-multi\xtime.obj" -Tp"libs\thread\build\.
./sr
c\xtime.cpp"
...failed vc-C++
libs\thread\build\bin\libboost_thread.lib\vc7\debug\runtime-lin
k-static\threading-multi\xtime.obj...
--
/*******************/
×ÔÓÉ£šliberty£©ÎÞ·ÇŸÍÊÇÕâÑùÒ»ÖÖ³Ðŵ£ºÃ¿žöÈËœ«»áµÃµœÒ»ÖÖ±£ÕÏ£¬±£ÕÏÎÒÃÇ¿ÉÒÔÓë
ÈšÍþ¡¢¶àÊý¡¢Á÷Ë׌°ÓßÂÛµÄÓ°ÏìÏ࿹ºâ¡£
/*******************/
"Black Ice"
The last version of boost has got by CVS. set BOOST_ROOT=d:\boost\boost set VC7_ROOT=D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 bjam "-sTOOLS=vc7"
Command line error D2016 : '/Za' and '/Ze' command-line options are incompatible
-- /*******************/ ×ÔÓÉ£šliberty£©ÎÞ·ÇŸÍÊÇÕâÑùÒ»ÖÖ³Ðŵ£ºÃ¿žöÈËœ«»áµÃµœÒ»ÖÖ±£ÕÏ£¬±£ÕÏÎÒÃÇ¿ÉÒÔ Óë ÈšÍþ¡¢¶àÊý¡¢Á÷Ë׌°ÓßÂÛµÄÓ°ÏìÏ࿹ºâ¡£ /*******************/
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Looking at your failed command line, it is apparent that neither the /Ze nor the /Za options are set. Further looking down your command line logs, it looks to me as though you are trying to build using the vc7 toolset, but with the vc6 compiler (hint: your environment is only ever set up for vc6, run your vc7 version of vcvars32.bat before invoking jam). John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm
At 07:01 AM 1/4/2003, John Maddock wrote:
Looking at your failed command line, it is apparent that neither the /Ze nor the /Za options are set. Further looking down your command line logs, it looks to me as though you are trying to build using the vc7 toolset, but with the vc6 compiler (hint: your environment is only ever set up for vc6, run your vc7 version of vcvars32.bat before invoking jam).
I had a variety of that problem recently too. It was what was keeping the VC++6 regressions from working for a long time. IIRC, the toolsets invoke vcvars32.bat automatically. But vcvars32.bat is sometimes generated using the short form of directory names. Then some subsequent install activity is invalidating those names. I fixed the problem by hand editing vcvars32.bat to use the full, long, names. --Beman
After comment line flags vc7 C++FLAGS : /Zc:wchar_t,forScope ; in
vc7-tools.jam
Build successfully.
--
/*******************/
×ÔÓÉ£šliberty£©ÎÞ·ÇŸÍÊÇÕâÑùÒ»ÖÖ³Ðŵ£ºÃ¿žöÈËœ«»áµÃµœÒ»ÖÖ±£ÕÏ£¬±£ÕÏÎÒÃÇ¿ÉÒÔÓë
ÈšÍþ¡¢¶àÊý¡¢Á÷Ë׌°ÓßÂÛµÄÓ°ÏìÏ࿹ºâ¡£
/*******************/
"Black Ice"
The last version of boost has got by CVS. set BOOST_ROOT=d:\boost\boost set VC7_ROOT=D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 bjam "-sTOOLS=vc7"
Command line error D2016 : '/Za' and '/Ze' command-line options are incompatible
-- /*******************/ ×ÔÓÉ£šliberty£©ÎÞ·ÇŸÍÊÇÕâÑùÒ»ÖÖ³Ðŵ£ºÃ¿žöÈËœ«»áµÃµœÒ»ÖÖ±£ÕÏ£¬±£ÕÏÎÒÃÇ¿ÉÒÔ Óë ÈšÍþ¡¢¶àÊý¡¢Á÷Ë׌°ÓßÂÛµÄÓ°ÏìÏ࿹ºâ¡£ /*******************/
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
participants (5)
-
Beman Dawes
-
Black Ice
-
David Abrahams
-
Edward Diener
-
John Maddock