|
-
Jun 6th, 2004, 10:46 AM
#1
Thread Starter
Addicted Member
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
Using Visual Studio .NET 2005
-
Jun 7th, 2004, 08:18 AM
#2
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.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jun 7th, 2004, 12:34 PM
#3
Thread Starter
Addicted Member
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.
Using Visual Studio .NET 2005
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|