Results 1 to 3 of 3

Thread: Using STL?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    195

    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

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    195
    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
  •  



Click Here to Expand Forum to Full Width