Results 1 to 5 of 5

Thread: stream.h and fstream.h NOT FOUND

  1. #1
    Join Date
    Jun 2008
    Location
    Erode,TamilNadu,India
    Beans
    135
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Question stream.h and fstream.h NOT FOUND

    Hai,
    I recently installed Ubuntu 8.10.Actually I need g++ for my project.So I installed it through synaptic.I installed g++,g++ 4.1,g++4.2,g++ 4.3 all shown in synaptic.
    But when i compile my project it says,
    stream.h - No Such File or Directory Found
    fstream.h - No Such File or Directory Found

    I m really in need of these headers.Pls help me to get rid of it soon.Thank you....
    cheers.....
    Using Ubuntu is a Pleasure
    http://infoqueue.wordpress.com

  2. #2
    Join Date
    Jan 2008
    Beans
    4,757

    Re: stream.h and fstream.h NOT FOUND

    It's available in the package:
    Code:
    libstdc++6-4.2-dev
    Which only requires g++-4.2, so you can remove g++-4.1, as it is not needed.

    Although, you may want to review/update your code in the near future, as those headers appear to have been removed/deprecated in the g++-4.3 lib/headers.

    By having a quick look at just what is in those headers, all that needs doing is replace "#include <stream.h>" with
    Code:
    #include <iostream>
    and "#include <fstream.h>" with
    Code:
    #include <fstream>
    Regards
    Iain
    Last edited by ibuclaw; June 6th, 2009 at 06:08 PM.

  3. #3
    Join Date
    Jun 2008
    Location
    Erode,TamilNadu,India
    Beans
    135
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: stream.h and fstream.h NOT FOUND

    Thank you tinivole...I ll try it soon and reply you...
    Using Ubuntu is a Pleasure
    http://infoqueue.wordpress.com

  4. #4
    Join Date
    Jun 2009
    Beans
    6
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: stream.h and fstream.h NOT FOUND

    sorry.
    Last edited by sirene; June 16th, 2009 at 06:19 AM. Reason: I think its a closed thread,and doesn't similar to my problem,so I posted a new thread.

  5. #5
    Join Date
    Jan 2010
    Beans
    1

    Re: stream.h and fstream.h NOT FOUND

    I tried installing those libraries and <fstream.h> is still not recognized. I can use <fstream> fine though but I had to take out all my instances of std::fstream foo; and stick a using namespace std; at the top of the file, which I despise. Is this normal? I am using Karmic Koala.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •