ATL conflict between VC 7 STL and SGI STL - how to resolve 
Author Message
 ATL conflict between VC 7 STL and SGI STL - how to resolve

I am using Microsoft VC 7.0 beta.  I'm STRUGGLING big time trying to
use the SGI implementation of STL instead of the default Microsoft STL
included with VC.

Can anyone tell me the proper way to set things up so that there are
no conflicts between the SGI STL and MS's STL?

I am getting all sorts of compile/link errors that seem to suggest
that the the presence of the SGI STL include files is causing
compile/link errors with Microsoft's ATL (which I'm using) and other
things as well.

In particular, when doing this:
#include <hash_map>
#include <atlcoll.h>
I get hundreds of the following error message:
  Error C2027: use of undefined type 'ATL::CVarTypeInfo'

If I remove the include of atlcoll.h (which I need for other things)
then it compiles and links fine.  Likewise if I remove the include of
hash_map and its related code and keep the atlcoll.h, then it works
fine too.

Here's what I've done to set up the SGI STL - perhaps this is wrong?
1) downloaded the SGI STL files to c:\stl
2) changed my VC compiler options to have c:\stl as the first
directory it looks in for include files.

But this doesn't seem right as I'm getting all sorts of conflicts.  I
tried both with defining __STL_NO_NAMESPACES and not defining that.
Defining it at first seemed to resolve some compile issues, but then
when I needed the atlcoll.h and hash_map together I was back at
getting the C2027 error mentioned above.

It seems as though some of the ATL classes use some of the same
template/class names as used by the STL and that may be where the
problem is coming from.  I even tried changing the STL via
stl_config.h to define a unique namespace for the SGI STL, but that
didn't help at all.

I would be VERY greatful and appreciative of any help or pointers on
how to override the MS STL with the SGI STL without causing all sorts
of these conflicts.  Please help!  Thank you!!


Fri, 02 Jul 2004 13:02:29 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Conflict between VC 7 STL and SGI STL - how to resolve

2. Conflict between VC 7 STL and SGI STL - how to resolve?

3. Porting code from SGI STL to MSVC STL

4. SGI-STL or STL of VC++

5. VC++ STL v/s SGI STL Performance ???

6. VC 5.0 and SGI STL

7. SGI STL w/vc 5.0?

8. sgi STL & vc++ 6.0

9. VC 6 and SGI STL 3.11

10. SGI STL usable with VC 4.0

11. VC 5.0 - STL and the ATL project wizard

12. Free C++ SIG:Austern,SGI STL;Feb 8,Sat


Powered by phpBB® Forum Software