Boost C++ Libraries: Ticket #234: DevStudio 6.0 SP5 precompiled headers and regex
https://svn.boost.org/trac10/ticket/234
<pre class="wiki">trying out the new boost_1_31_0 and i'm having
problems using the updated regex library as a
precompiled header.
i was using 1.30.2 and had no troubles, though it seems
more like a compiler problem (MSVC++ 6.0 SP5), so i
don't know what can be done about it.
...\boost\regex\v4\perl_matcher_common.hpp(660) :
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1794)
Please choose the Technical Support command on
the Visual C++
Help menu, or open the Technical Support help
file for more information
to recreate in a tiny project, all i did was (within the
msvc gui) File|New|Projects select win32 console app.
Selected "A simple application" when asked what kind of
console app i wanted to create.
Opened stdafx.h and added the line:
#include <boost\regex.hpp>
right after the generated TODO: line
Build|Rebuild All
I'd be curious if the .Net compiler had the same problem,
but I assume it doesn't. I can say that if I pull the
regex.hpp out of stdafx.h and put it into each .h or .cpp
file that references boost::regex, I get a clean compile.
However, I have dozens of tiny projects that would
require this change.
</pre>en-usBoost C++ Libraries/htdocs/site/boost.png
https://svn.boost.org/trac10/ticket/234
Trac 1.4.3John MaddockFri, 06 Feb 2004 12:01:22 GMT
<link>https://svn.boost.org/trac10/ticket/234#comment:1 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/234#comment:1</guid>
<description>
<pre class="wiki">Logged In: YES
user_id=14804
I've tried all sorts of things to try and fix this, but I can't see
any solution. As you rightly say Visual Studio .NET and .NET
2003 don't have this issue (I've checked). The strange thing
is, the pre-compiled header builds OK, it's only when you
come to use it that the error occurs. If anyone has any
ideas I'd appreciate it.
John
</pre>
</description>
<category>Ticket</category>
</item>
<item>
<dc:creator>John Maddock</dc:creator>
<pubDate>Fri, 06 Feb 2004 12:16:01 GMT</pubDate>
<title>status changed
https://svn.boost.org/trac10/ticket/234#comment:2
https://svn.boost.org/trac10/ticket/234#comment:2
<ul>
<li><strong>status</strong>
<span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span>
</li>
</ul>
<pre class="wiki">Logged In: YES
user_id=14804
Following the instructions in
http://support.microsoft.com/default.aspx?scid=kb;en-
us;195738 I have a workaround: change your project pre-
compiled header settings from "Use precompiled header file"
to "Automatic use of precompiled headers". I don't know
what effect this has on compile times though - in theory
none if you enter "stdafx.h" as the header name in the box
provided (I've checked this works in your text case).
John.
</pre>
TicketgconklinFri, 06 Feb 2004 14:12:22 GMT
<link>https://svn.boost.org/trac10/ticket/234#comment:3 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/234#comment:3</guid>
<description>
<pre class="wiki">Logged In: YES
user_id=529585
Thanks for looking into this issue and your super-fast
response. It's funny, that article said for win9x, but I'm on
XP. Anyway, moving it to automatic seems to work for
projects with one file, but when adding another class (.cpp/.h
set) the problem pops up again. Oh well, maybe time to look
into upgrading the ol' compiler.
Anyway, thanks again, and thanks for all the work you do for
the community.
</pre>
</description>
<category>Ticket</category>
</item>
<item>
<dc:creator>gconklin</dc:creator>
<pubDate>Sun, 08 Feb 2004 02:02:46 GMT</pubDate>
<title/>
<link>https://svn.boost.org/trac10/ticket/234#comment:4 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/234#comment:4</guid>
<description>
<pre class="wiki">Logged In: YES
user_id=529585
I looked into this a little more and just messed around and
tried various things. This isn't ideal, but may be of interest
and help to others.
It doesn't really make any sense to me, but here's what I did.
I removed all these lines:
#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable:4127)
#endif
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
throughout the file that was giving me problems (which at
some point became perl_matcher_recursive.hpp).
Like I said, it doesn't make much sense, but thought I'd just
make a note of my findings and what worked for me. Since it's
just a pragma that disables warnings, I'm not too worried
about my changes affecting functionality, though I haven't
done extensive testing yet; just a quick run through of some
of my apps that use regex.
</pre>
</description>
<category>Ticket</category>
</item>
</channel>
</rss>