Sign in to follow this  

Fatal Error with SGI's STL

This topic is 4271 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4271 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this