Fatal Error with SGI's STL

Started by
6 comments, last by gumpy 18 years ago
I have been trying to work with STL, and I originally downloaded SGI's implementation. When I include any header file from the folder (vector, stack it doesn't matter - and it does this when I insert .h or not) I get the following error with VS7.1

fatal error C1001: INTERNAL COMPILER ERROR
        (compiler file 'msc1.cpp', line 2701) 
         Please choose the Technical Support command on the Visual C++ 
         Help menu, or open the Technical Support help file for more information
It's not a big problem, as STLPort works fine, but does anyone know what might be causing this, as I don't want it to cause problems later. Thanks Spree
Advertisement
I used to get this all the time in VC 6, and I've only had it once or twice in VS2003. It's just the compiler spazzing out over something you have no control over, probably their use of templates.
I've managed to get rid of this error by renaming variables and re-ordering my code, there's not much you can do.

Try including headers in a different order, or include some headers you don't use, and see if that fixes it. Or get VS2005, that'll almost definitely fix it :P
You're using MSVC 7.1, it comes with a far better version of the C++ standard library than you'll ever get from SGI. In fact, the STL from SGI is way pre-standard and may have stuff in it that will break a standard-conforming compiler.

Why not just use the C++ standard library and be done with?

Stephen M. Webb
Professional Free Software Developer

Quote:Original post by Bregma
You're using MSVC 7.1, it comes with a far better version of the C++ standard library


:Blush: Errr.. I didn't know VS even came with an implementation of the STL...

Having said that, I am aiming for a cross platform development, but I can use the MS STL implementation when developing with it :)


Quote:Original post by Evil Steve
Or get VS2005, that'll almost definitely fix it


I'm in the process of getting hold of a copy of VS 8, which will hopefully solve any future problems I have with the IDE :)

Thanks for the quick replys, sorry it took me so long to say thanks too ;)
Spree
Quote:Original post by SpreeTree
Quote:Original post by Bregma
You're using MSVC 7.1, it comes with a far better version of the C++ standard library


:Blush: Errr.. I didn't know VS even came with an implementation of the STL...

Having said that, I am aiming for a cross platform development, but I can use the MS STL implementation when developing with it :)


For cross-platform development you would compile against each platform's native stdlib on that particular platform.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Quote:Original post by SpreeTree
Quote:Original post by Bregma
You're using MSVC 7.1, it comes with a far better version of the C++ standard library


:Blush: Errr.. I didn't know VS even came with an implementation of the STL...


The STL was significantly reworked when it got integrated into C++ as it was being standardized in 1998. The moniker "STL" properly only refers to the pre-standard HP and SGI versions, though it is in common usage in reference to the equivalent components in the Standard C++ Library.

And I don't think it should come as a surprise that C++ compilers would provide an implementation of the Standard C++ Library.

Quote:Having said that, I am aiming for a cross platform development, but I can use the MS STL implementation when developing with it :)


Unless you are using VC6 which has significant issues, both at the compiler level (incomplete template support leading to the C1001 errors you mentioned) and at the library level, there shouldn't be any major portability issue regarding standard library usage. That's why it is standard. Things have gone a long way since the mid-90s.

Quote:I'm in the process of getting hold of a copy of VS 8, which will hopefully solve any future problems I have with the IDE :)


Wise.

If you intend to do cross-platform development, you shouldn't limit yourself to a single compiler, but make sure that your program compiles (and runs!) on as many platforms as you can put your hands on. That's the only foolproof test.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Quote:Original post by Fruny
If you intend to do cross-platform development, you shouldn't limit yourself to a single compiler, but make sure that your program compiles (and runs!) on as many platforms as you can put your hands on. That's the only foolproof test.


In particular, make sure to account for the differences between the Microsoft compilers and GCC. MSVC is almost always used on Windows, and GCC is pretty much the standard every where else.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Quote:Original post by Evil Steve
I used to get this all the time in VC 6, and I've only had it once or twice in VS2003. It's just the compiler spazzing out over something you have no control over, probably their use of templates.
I've managed to get rid of this error by renaming variables and re-ordering my code, there's not much you can do.

Try including headers in a different order, or include some headers you don't use, and see if that fixes it. Or get VS2005, that'll almost definitely fix it :P


2k5 isn't exactly perfect either, but i've only managed to crash it with one template so far. the best part is it literally crashed the compiler. no "internal error" message or anything. fortunately it was all caused by a typo anyway. [lol]

i have to agree with the 2k5 suggestion. it's a great improvement over 2k3.
This space for rent.

This topic is closed to new replies.

Advertisement