-
Using STL?
I've downloaded the latest version of SGI's STL headers (Version 3.3). I tried to configure these for use with
MSVC++ 6.0 by adding the directory to the top of the 'include' list in the directories tab of the Options dialog.
The problem is that now whenever I try to use the stream classes (fstream for example) I get a load of errors
in some of the header files (not from the STL).
Code:
#include <fstream>
void main ()
{
std::ofstream sTest;
}
The above code, for example, produces 80 errors and 16 warnings. The first few include:
Code:
c:\program files\microsoft visual studio 6.0\vc98\include\xiosbase(106) : error C2146: syntax error : missing ';' before identifier 'precision'
c:\program files\microsoft visual studio 6.0\vc98\include\xiosbase(106) : error C2501: 'streamsize' : missing storage-class or type specifiers
c:\program files\microsoft visual studio 6.0\vc98\include\xiosbase(107) : warning C4183: 'precision': member function definition looks like a ctor, but name does not match enclosing class
c:\program files\microsoft visual studio 6.0\vc98\include\xiosbase(108) : error C2146: syntax error : missing ';' before identifier 'precision'
Can anyone tell me why I'm getting these errors? Am I setting up MSVC++ wrong? The errors are occuring in
headers that aren't part of the new STL version I download (and nor are they all in xiosbase).
Thanks
-
That's strange. I'd expect you to get quite different compile errors. I'm not sure if VC++ supports everything the newest SGI STL needs.
I suspect it has to do with how the include chain proceeds.
On a side note, main never returns void, always int.
-
I think its because the new version doesn't come with updated stream headers, and the old ones aren't compatible. Maybe.
I downloaded STLport instead and this seems to be working.