Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2000-10-31 11:58:15


The minimal rebuild option always caused trouble in my VC++ projects,
and it doesn't provide much benefit if your headers are well factored.

That said, one way to cause /Gm to fail is to break the One Definition
Rule.

----- Original Message -----
From: Jeremy Siek <jsiek_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, October 31, 2000 9:48 AM
Subject: RE: [boost] BGL connected_components still breaks VC++

> Hi John,
>
> By playing around with the options I discovered that it is
> only when option /Gm (enable minimal rebuild) is used that
> the internal compiler occurs. Can you make due without this
> option? I'd rather not spend time trying to work around
> this bug in VC++. Please report this to Microsoft.
>
> Thanks,
>
> Jeremy
>
>
> -----Original Message-----
> From: John Britton [mailto:johnb_at_[hidden]]
> Sent: Monday, October 30, 2000 5:36 PM
> To: 'boost_at_[hidden]'
> Subject: [boost] BGL connected_components still breaks VC++
>
>
> I was hoping that version 1.18.1 would magically make my problem with VC++
> and connected_components go away, but alas, it does not.
>
> If I create an empty console application project, and then add a file
> containing the enclosed source code to it, making no changes to the project
> settings (other than to set the additional include directories to point to
> boost), compiling the file for Win32 Debug causes a VC++ internal compiler
> error (noted below). Compiling for Win32 Release does not excite the error.
>
> I don't think the problem is as simple as the difference between debug and
> release - in the past I was able to "fix" the problem in the debug version
> of my code by doing such things as: moving code blocks around, going from
> multi-threaded to single-threaded, and even by enclosing some of the code
> with #if 1 / #endif !
>
> John Britton
> Very Important Engineer++
> Peak Audio Inc.
> 1790 30th Street, Suite 414
> Boulder, CO 80301
> 303.449.9337 x102
> johnb_at_[hidden]
> http://www.peakaudio.com/
>
> /*====
> msbug.cpp
> Code demonstrating a VC++ compiler problem
>
> d:\code\ningaloo\software\agnostic\boost\boost\graph\detail\adjacency_list.h
> pp(1749)
> : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line
> 1794)
>
> ====*/
> #pragma warning (disable: 4786)
> #include <utility>
> #include <vector>
>
> #include <boost/graph/adjacency_list.hpp>
> #include <boost/graph/connected_components.hpp>
>
> typedef std::pair<int, int> edge_t;
> typedef std::vector< edge_t > edge_list_t;
>
> size_t check_components( int num_vertices, edge_list_t& the_edges ) {
> // create a graph based on the_edges
> typedef boost::adjacency_list<
> boost::vecS, boost::vecS, boost::undirectedS, boost::property<
> boost::vertex_discover_time_t, int, boost::property<
> boost::vertex_finish_time_t, int, boost::property<
> boost::vertex_color_t, boost::default_color_type > > > > graph_t;
> graph_t G( num_vertices, the_edges.begin(), the_edges.end() );
> // result data: component ID for each vertex
> std::vector<int> c( boost::num_vertices(G) );
> // run the algorithm
> int num = boost::connected_components(
> G, &c[0], boost::get( boost::vertex_color, G ), boost::dfs_visitor<>()
> );
> return num;
> }
>
>
>
>
>
>
>
>
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk