SGI STL 3.11 
Author Message
 SGI STL 3.11

Has anybody tried using the SGI version 3.11 of the STL?  It can't be any
worse than Microsoft's implementation, can it?

Mike Burroughs
Chief Architect
NSI Software, Inc.



Tue, 24 Apr 2001 03:00:00 GMT  
 SGI STL 3.11
Quote:
>Has anybody tried using the SGI version 3.11 of the STL?  It can't be any
>worse than Microsoft's implementation, can it?

STL that comes with VC++ is implemented by Dinkum, not MS themselves. And I
don't think it's that bad. IMHO, it's quite a good one.

--
Frederick J. Dunhill
To reply via e-mail, replace coldmail.org with hotmail.com

"How about an anti spammers campaign?"



Fri, 27 Apr 2001 03:00:00 GMT  
 SGI STL 3.11
Hi,

Quote:

> Has anybody tried using the SGI version 3.11 of the STL?  It can't be any
> worse than Microsoft's implementation, can it?

Yes I have. It works so far for me with VC6. The 3.11 STL contains a lot
of enhancements,  such as hash_map and rope.

/Jonas U



Fri, 27 Apr 2001 03:00:00 GMT  
 SGI STL 3.11
I did try, though, and it doesn't work with VC++ 6.0 ({*filter*} the compiler
with 100 or so error messages). How do you make it work with VC++ 6.0? Did
you put it in a separate directory, of you just replace your header files
with SGI's? I put it in separate directory and add the directory to the
include path, above the C:\Program Files\....\VC98\include, So I know that
the SGI's headers will always be searched first. But then...

--
Frederick J. Dunhill
To reply via e-mail, replace coldmail.org with hotmail.com

"Before order there is chaos. Before happiness there is sorrow. Before life
there is death. Like a phoenix bird it vanishes, like a phoenix bird it
resurrects."

Quote:

>Has anybody tried using the SGI version 3.11 of the STL?  It can't be any
>worse than Microsoft's implementation, can it?

>Mike Burroughs
>Chief Architect
>NSI Software, Inc.



Mon, 30 Apr 2001 03:00:00 GMT  
 SGI STL 3.11

Quote:

> I did try, though, and it doesn't work with VC++ 6.0 ({*filter*} the compiler
> with 100 or so error messages). How do you make it work with VC++ 6.0? Did
> you put it in a separate directory, of you just replace your header files
> with SGI's? I put it in separate directory and add the directory to the
> include path, above the C:\Program Files\....\VC98\include, So I know that
> the SGI's headers will always be searched first. But then...

I have SGI STL in a separate directory and added that directory first in
the include path. I have only used these include files so far: vector,
algorithm, function, set and hash_map. Could you please post some of the
errors you get?

/Jonas U



Mon, 30 Apr 2001 03:00:00 GMT  
 SGI STL 3.11
I've been working on a port from SGI's to meet my own needs.  The container
classes are complete, and it's at
http://www.*-*-*.com/ ~fluxsmith/Programming/library.html
It's specifically for MSVC 6.0, which requires many changes to otherwise
good code because of internal compiler errors.


Quote:
>I did try, though, and it doesn't work with VC++ 6.0 ({*filter*} the compiler
>with 100 or so error messages). How do you make it work with VC++ 6.0? Did
>you put it in a separate directory, of you just replace your header files
>with SGI's? I put it in separate directory and add the directory to the
>include path, above the C:\Program Files\....\VC98\include, So I know that
>the SGI's headers will always be searched first. But then...

>--
>Frederick J. Dunhill
>To reply via e-mail, replace coldmail.org with hotmail.com

>"Before order there is chaos. Before happiness there is sorrow. Before life
>there is death. Like a phoenix bird it vanishes, like a phoenix bird it
>resurrects."


>>Has anybody tried using the SGI version 3.11 of the STL?  It can't be any
>>worse than Microsoft's implementation, can it?

>>Mike Burroughs
>>Chief Architect
>>NSI Software, Inc.



Mon, 30 Apr 2001 03:00:00 GMT  
 SGI STL 3.11

Quote:
>I have SGI STL in a separate directory and added that directory first in
>the include path. I have only used these include files so far: vector,
>algorithm, function, set and hash_map. Could you please post some of the
>errors you get?

Hmm, I think that explains it. Later observation showed that SGI's
*compiles* with VC 6.0 *provided* that you don't use the non-STL headers
that
comes with SGI's STL, like <bitset> or <string>. If you stick with STL
headers, it compiles fine. The following headers compile without problems

<algorithm>  <deque>   <functional>  <hash_map>   <hash_set>   <iterator>
<list>    <map>    <memory>   <numeric>   <queue>   <rope>    <set>
<slist>
<stack>   <utility>   <vector>

And this is some of the error messages I got by including <string>:

c:\vc\include\sgi\stl_string_fwd.h(38) : error C2065: 'alloc' : undeclared
identifier
c:\vc\include\sgi\stl_string_fwd.h(38) : error C2974: 'basic_string' :
invalid template argument for '_Alloc', type expected
        c:\vc\include\sgi\stl_string_fwd.h(36) : see declaration of
'basic_string'
c:\vc\include\sgi\stl_string_fwd.h(39) : error C2974: 'basic_string' :
invalid template argument for '_Alloc', type expected
        c:\vc\include\sgi\stl_string_fwd.h(36) : see declaration of
'basic_string'

Defining this:
#define __STL_USE_STD_ALLOCATORS

reduce the errors, but I must stop there since VC++ 6.0 just can't compile
the following line:

=>  template <class _Tp1> allocator(const allocator<_Tp1>&) __STL_NOTHROW {}

using template keyword for members, that is. Take a look at stl_alloc.h

But then, something still bothers me, though. Don't you use <string>, or
stream whatsoever? Because merely the inclusion of <string> or stream
library again stall the compiler (this is after I rename SGI's string and
bitset, again using VC string and bitset)... <sigh>

Guess I'll go to

http://www.mindspring.com/~fluxsmith/Programming/library.html

and take a close look at Jonathan's work.

--
Frederick J. Dunhill
To reply via e-mail, replace coldmail.org with hotmail.com

"Before order there is chaos. Before happiness there is sorrow. Before life
there is death. Like a phoenix bird it vanishes, like a phoenix bird it
resurrects."



Tue, 01 May 2001 03:00:00 GMT  
 SGI STL 3.11

Quote:

> But then, something still bothers me, though. Don't you use <string>, or
> stream whatsoever? Because merely the inclusion of <string> or stream
> library again stall the compiler (this is after I rename SGI's string and
> bitset, again using VC string and bitset)... <sigh>

It seems that VC6 has serious trouble with the <string> include file. I
have no code that uses the string class so I guess that I'm lucky. How
about removing the SGI string include files and use the VC6 variants? (I
haven't tried it myself)

/Jonas U



Tue, 01 May 2001 03:00:00 GMT  
 SGI STL 3.11
Quote:
>It seems that VC6 has serious trouble with the <string> include file. I
>have no code that uses the string class so I guess that I'm lucky. How
>about removing the SGI string include files and use the VC6 variants? (I
>haven't tried it myself)

I have, by renaming SGI <string>, but then, using VC 6.0 <string> again
yielded tens of errors. I'm still figuring this out.

--
Frederick J. Dunhill
To reply via e-mail, replace coldmail.org with hotmail.com

"Before order there is chaos. Before happiness there is sorrow. Before life
there is death. Like a phoenix bird it vanishes, like a phoenix bird it
resurrects."



Thu, 03 May 2001 03:00:00 GMT  
 SGI STL 3.11

Quote:

>STL that comes with VC++ is implemented by Dinkum, not MS themselves. And I
>don't think it's that bad. IMHO, it's quite a good one.

Did anybody get the shipped STL to work when the -Za flag is used?
I want to disable the "language extensions", that ruin the correct
for-scoping rules.

I want to write code like: [warning: untested]

---
#include <string>

using namespace std;

int main() {
        string t = "First we do something: ";
        for (int i=1; i <= 9: ++i) {
                t = t + ".";
        }
        t = t + " and now something else: ";
        for (int i=9; i > 0; --i) {
                t = t + "!";
        }
        return t.size();

Quote:
}

---

When compiled without the -Za flag, I get a "redefinition of i" error,
which clearly is a violation of the C++ standard.

So, I try with the -Za enable, but then the compiler fails with hundreds
of errors.

I tried to use the SGL STL 3.11 instead of the included STL, but experienced
the same problem with #include <string> as already discussed.

Does anybody know a way to enable the correct for-scoping without breaking
the STL?  Anything, including the use of an alternative STL implementation,
is a solution to me, as long as it is portable to any reasonably compliant
C++ compiler with a reasonably compliant STL library.

Thanks,

Asger Alstrup Nielsen



Mon, 14 May 2001 03:00:00 GMT  
 SGI STL 3.11
try the following...

Quote:
> #include <string>

> using namespace std;

#pragma warning( disable:4127)
#define for if(0);else for

Quote:
> int main() {
>         string t = "First we do something: ";
>         for (int i=1; i <= 9: ++i) {
>                 t = t + ".";
>         }
>         t = t + " and now something else: ";
>         for (int i=9; i > 0; --i) {
>                 t = t + "!";
>         }
>         return t.size();
> }

--
Robert Paulsen                         http://paulsen.home.texas.net
If my return address contains "ZAP." please remove it. Sorry for the
inconvenience but the unsolicited email is getting out of control.


Mon, 14 May 2001 03:00:00 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. VC 6 and SGI STL 3.11

2. Sgi Stl 3.11 anyone using it with VC++ 6?

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

4. ATL conflict between VC 7 STL and SGI STL - how to resolve

5. Porting code from SGI STL to MSVC STL

6. SGI-STL or STL of VC++

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

8. How to build a win 3.11 printer driver

9. Hardware interrupts under Windows 3.11

10. pb with BC++ 4.02 under W4W 3.11 --- HELP would be (very) appreciated

11. pad2ps 3.11

12. Problem with db_Vista under Windows 3.11

 

 
Powered by phpBB® Forum Software