On 15 Sep 2000, at 9:25, Greg Chicares wrote:
> Don Pellegrino wrote:
> > I got some weirdness with including <vector> today. When I included
> > it more than once in some source code and then tried to add an element
> > to a vector<string> the code would compile but crash with a memory
> > exception on the element insertion line of the code. After I removed
> > the second occurance of the #include <vector> the code then
> > worked. (The first include was included in a header that I was using
> > and the second was in another source file that included that header.
> > I removed the second occurance).
> Can you post a minimal test case? It looks like the include guards
> should prevent this. Is it possible that you're actually getting
> <vector> from some other directory that comes earlier on the
> include path? Have you installed newer C++ standard library code?
> Have you modified any gcc headers?
Once I got something very similar with MINGW. As far as I found that
time LD resolved some member to be searched in some DLL (really I
had 'call 0' in disassembler output, of course I got crash there).
That time I didn't have time to mess with that more and changed to use
my own (old and not very perfect, but sufficient for this case) vector
class. Didn't tried to use STL for MINGW any more (I'm using
MINGW only for some projects)
I haven't experienced similar problems with other gcc targets I'm using
(i86-*-linux-gnu and i86-pc-msdosdjgpp).