compile error, fstream.h, g++ version

P

Pasacco

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

---------------------------------------------------------------

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

Pasacco said:
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 said:
---------------------------------------------------------------


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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top