Louis - you may already be aware of the MSVC 6.0 compiler switch /Zm that
increases the width of heap stripes allocated to each of several threads
spawned by the compiler. This is a _course_ and crude mechanism that
_sometimes_ will get MSVC 6.0 to compile complicated templated code. The
internal compiler error emitted just prior to the compiler giving up is
pretty non-descript. Sometimes you're trying to compile more modern C++ than
MSVC can handle, and sometimes the compiler is just running out of heap on
one or more of its threads. In any case, /Zm is worth a try. (Note: it's my
understanding the MSVC allocates heap to each of its compiler threads once
and should a thread run out of memory, an internal compiler error occurs
without any reasonable explanation. There is no dynamic re-allocation of
heap if a thread runs short of memory. As there is more than one way to get
MSVC 6.0 into "internal compiler error" territory, there is no guarantee
that /Zm will help you. However, it will not hurt you and I typically add
this switch to every MSVC project by hand).
Note that MSVC 6.0 /Zm does not work the same way on NT/2000/XP as it does
on prior versions of Windows. Because of the way memory is allocated in the
older Windows versions, /Zm infrequently is any help at all if you're
building on a Win9x machine (clearing throat). So use something with an NT
kernel and throw /Zm1000 in your compiler options list and see what happens
should you run into more problems. The docs on /Zm are sketchy to
non-existent. There has been some useful discussion about this subject
related to compiling templated code on the Windows Template Library
developers list on Yahoo Groups.
Try this link for some additional information on /Zm:
http://groups.yahoo.com/group/wtl/messagesearch?query=%2FZm
Hope this is useful.
- Regards
Chris Russell
----- Original Message -----
From: "Louis Lavery"
Louis Lavery wrote:
Hello,
I've bought the book (BGL) and am trying to compile boost_1_27_0/boost/libs/example/adjacency_list.cpp but...
...MSVC6 spits out the dreaded "fatal error C1001: INTERNAL COMPILER
ERROR".
I'm in the same boat you are. I use stlport rather than the STL that ships with VC++, by the way. I got the same result that you did -- compiler crashed. It looks suspiciously like a bug that was presumeably fixed in version 5.0.
I've been able to make a graph using listS for the nodes, and also slistS, rather than vecS. You might want to give that a try.
Dave
I've been meaning to get STLport so I've now got it :-) After some messing about I managed to compile and run adjacency_list.cpp. After more messing about, it now compiles as is and without STLport! All I've done is turn off incremental compiling and linking and precompiled headers. Thanks for you help, Louis. 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/