compile error, fstream.h, g++ version

Discussion in 'C++' started by Pasacco, Apr 1, 2005.

  1. Pasacco

    Pasacco Guest

    Dear

    When I was installing a software written in C++, following error
    message appeared, in my platform (gcc version 3.2.2 20030222 Red Hat
    Linux 3.2.2-5). I guess that this problem might be comming from a
    configuration or g++ version compatibility. If someone has this
    experience, let us know how to shoot this trouble. Thankyou

    ---------------------------------------------------------------
    > make


    In file included from ../inc/PRZFicheroLog.hpp:33,
    from ../inc/SFSPool.inl:62,
    from ../inc/SFSPool.hpp:54,
    from ../inc/PRZFlow.hpp:43,
    from ../inc/PRZRunnableComponent.hpp:35,
    from ../inc/PRZRouter.hpp:32,
    from ../inc/PRZNetwork.hpp:41,
    from ../inc/PRZSimulation.hpp:37,
    from ../inc/ATCSimulator.hpp:35,
    from ../src/PRZMain.cpp:29:
    /usr/include/c++/3.2.2/backward/fstream.h: At global scope:
    /usr/include/c++/3.2.2/backward/fstream.h:35: using declaration
    `ifstream'
    introduced ambiguous type `ifstream'
    /usr/include/c++/3.2.2/backward/fstream.h:36: using declaration
    `ofstream'
    introduced ambiguous type `ofstream'
    make: *** [PRZMain.o] Error 1
    Pasacco, Apr 1, 2005
    #1
    1. Advertising

  2. Pasacco wrote:
    > When I was installing a software written in C++, following error
    > message appeared, in my platform (gcc version 3.2.2 20030222 Red Hat
    > Linux 3.2.2-5). I guess that this problem might be comming from a
    > configuration or g++ version compatibility. If someone has this
    > experience, let us know how to shoot this trouble. Thankyou


    Do not use <fstream.h>, there is no such standard header. Use <fstream>.

    I don't know whether "PRZFicheroLog.hpp" is your file or you're using some
    kind of third-party library, so I can't tell you anything specific, except
    that if it's your file, fix it, if it's a third-party file, contact them
    for the updated version; it's been seven years since C++ was standardized
    and <fstream.h> should have been removed from all code long time ago.

    >
    > ---------------------------------------------------------------
    >
    >>make

    >
    >
    > In file included from ../inc/PRZFicheroLog.hpp:33,
    > from ../inc/SFSPool.inl:62,
    > from ../inc/SFSPool.hpp:54,
    > from ../inc/PRZFlow.hpp:43,
    > from ../inc/PRZRunnableComponent.hpp:35,
    > from ../inc/PRZRouter.hpp:32,
    > from ../inc/PRZNetwork.hpp:41,
    > from ../inc/PRZSimulation.hpp:37,
    > from ../inc/ATCSimulator.hpp:35,
    > from ../src/PRZMain.cpp:29:
    > /usr/include/c++/3.2.2/backward/fstream.h: At global scope:
    > /usr/include/c++/3.2.2/backward/fstream.h:35: using declaration
    > `ifstream'
    > introduced ambiguous type `ifstream'
    > /usr/include/c++/3.2.2/backward/fstream.h:36: using declaration
    > `ofstream'
    > introduced ambiguous type `ofstream'
    > make: *** [PRZMain.o] Error 1
    >


    V
    Victor Bazarov, Apr 1, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Armando
    Replies:
    6
    Views:
    735
    Armando
    Jan 29, 2004
  2. Nagaraj
    Replies:
    1
    Views:
    837
    Lionel B
    Mar 1, 2007
  3. V Green
    Replies:
    0
    Views:
    824
    V Green
    Feb 5, 2008
  4. PA Bear [MS MVP]
    Replies:
    0
    Views:
    929
    PA Bear [MS MVP]
    Feb 5, 2008
  5. MowGreen [MVP]
    Replies:
    5
    Views:
    1,993
    PA Bear [MS MVP]
    Feb 9, 2008
Loading...

Share This Page