[boost] 1.33.1 [regex] compile with vc2005 express: fatal error C1071
I download vc2005 express and install Microsoft Platform SDK for Windows Server 2003 SP1. I use Set Win Svr 2003 32-bit Build Env (Retail) to set the right platform environment and use the script below(vc2005 express and sdk are installed on the default directory) set BOOST_ROOT=c:\opt\boost set PYTHON_ROOT=c:\python set PYTHON_VERSION=2.4 call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" @set BZIP2_SOURCE=c:\opt\bzip2 @set ZLIB_SOURCE=c:\opt\zlib @set TOOLS=vc-8_0 bjam "-sBUILD=debug release <runtime-link>static/dynamic <threading>multi" --with-regex stage >log.txt 2>err.txt I got the error below ============================== vc-C++ bin\boost\libs\regex\build\boost_regex.dll\vc-8_0\debug\threading-multi\regex_traits_defaults.obj regex_traits_defaults.cpp C:\opt\boost\libs\regex\build\../src/regex_traits_defaults.cpp : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss C:\opt\boost\libs\regex\build\../src/regex_traits_defaults.cpp(668) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss C:\opt\boost\libs\regex\build\../src/regex_traits_defaults.cpp(690) : fatal error C1071: unexpected end of file found in comment CALL "C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\..\..\VC\bin\vcvars32.BAT" >nul "C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\..\..\VC\bin\cl" /Zm800 -nologo EHsc -c -DBOOST_REGEX_CONFIG_INFO=1 -DBOOST_REGEX_DYN_LINK=1 /Z7 /Od /Ob0 /EHsc /GR /MDd /Zc:forScope c:wchar_t -I"bin\boost\libs\regex\build" -I"C:\opt\boost" -Fo"bin\boost\libs\regex\build\boost_regex.dll\vc-8_0\debug\threading-multi\regex_traits_defaults.obj" -Tp"C:\opt\boost\libs\regex\build\../src/regex_traits_defaults.cpp" ============================== I find the description of fatal error C1071 in MSDN ============================== unexpected end of file found in comment The compiler reached the end of the file while scanning a comment. Possible causes Missing comment terminator (*/). Missing newline character after a comment on the last line of a source file. The following sample generates C1071: // C1071.cpp int main() { } /* this comment is fine */ /* forgot the closing tag // C1071 ============================== But regex can be compiled with vc7.1, I want to know if it is the vc8 express's fatal. Since I do not own a copy of VC8, I have not tried to compile boost 1.33.1 on it.
I got the error below ============================== vc-C++ bin\boost\libs\regex\build\boost_regex.dll\vc-8_0\debug\threading-multi\regex_traits_defaults.obj regex_traits_defaults.cpp C:\opt\boost\libs\regex\build\../src/regex_traits_defaults.cpp : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss C:\opt\boost\libs\regex\build\../src/regex_traits_defaults.cpp(668) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss C:\opt\boost\libs\regex\build\../src/regex_traits_defaults.cpp(690) : fatal error C1071: unexpected end of file found in comment
It builds with VC8 express OK for me, but I think this relates to the code page used on your machine - it's interpreting some of the characters in the comments as the start of a multi-byte sequence, and that's why the closing */ isn't found (it is there it's just not interpretted as such). I'm attaching a version with the comments deleted, can you let me know if this fixes the issue? Thanks, John.
----- Original Message -----
From: "John Maddock"
I got the error below ============================== vc-C++ bin\boost\libs\regex\build\boost_regex.dll\vc-8_0\debug\threading-multi\regex_traits_defaults.obj regex_traits_defaults.cpp C:\opt\boost\libs\regex\build\../src/regex_traits_defaults.cpp : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss C:\opt\boost\libs\regex\build\../src/regex_traits_defaults.cpp(668) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss C:\opt\boost\libs\regex\build\../src/regex_traits_defaults.cpp(690) : fatal error C1071: unexpected end of file found in comment
It builds with VC8 express OK for me, but I think this relates to the code page used on your machine - it's interpreting some of the characters in the comments as the start of a multi-byte sequence, and that's why the closing */ isn't found (it is there it's just not interpretted as such).
I'm attaching a version with the comments deleted, can you let me know if this fixes the issue?
Thanks,
John.
The attachment file still has the same problem. But I follow your hint and delete all the comments at the end of line from line 432 to line 485(the comments under euro symbol) and from line 627 to line 661 (also the comments under euro symbol). the building succeeds. Thank you for your help! --------------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Huifeng Shen
-
John Maddock