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."