473,699 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

compile error, fstream.h, g++ version

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.h pp:33,
from ../inc/SFSPool.inl:62,
from ../inc/SFSPool.hpp:54,
from ../inc/PRZFlow.hpp:43,
from ../inc/PRZRunnableComp onent.hpp:35,
from ../inc/PRZRouter.hpp:3 2,
from ../inc/PRZNetwork.hpp: 41,
from ../inc/PRZSimulation.h pp:37,
from ../inc/ATCSimulator.hp p: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

Jul 23 '05 #1
1 4958
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.h pp:33,
from ../inc/SFSPool.inl:62,
from ../inc/SFSPool.hpp:54,
from ../inc/PRZFlow.hpp:43,
from ../inc/PRZRunnableComp onent.hpp:35,
from ../inc/PRZRouter.hpp:3 2,
from ../inc/PRZNetwork.hpp: 41,
from ../inc/PRZSimulation.h pp:37,
from ../inc/ATCSimulator.hp p: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
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4013
by: muser | last post by:
Can anyone run this program through their compiler or if they can see a logical error please point it out. I have my tutor working on it at the moment but I would rather a less ambigious response than the one I think he will provide. The test data, A:\\"514650.txt", appears at the end of the program. The problem is that the program won't read this file and the debugger as far as i know how to work it won't point out the mistake of any....
2
4097
by: Laxman | last post by:
==C.H <== #include <fstream.h> class C { public: C(int i); friend ofstream& operator<<(ofstream& os, const C&); }; ------------------------------------------------------------ ==B.H <==
4
25643
by: David Hoffman | last post by:
When I compile it, I get a "error C2664: 'ExtractID' : cannot convert parameter 1 from 'char' to 'char '" error and I don't understand why. I am just learning C++, so keep it simple. One more note, I have the program compiled using strings instead of char; however, I should be able to convert all my strings to char and get the program to compile. Right? Here is my code. Thanks. // Written by David Hoffman // Sept 30, 2003
5
3328
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new rightType;
3
2613
by: ratzeel | last post by:
The following snippet code throws an error while compiling on SUN os.. Any idea how to resolve this... #include <iostream.h> #include <fstream.h> #include <math.h> #include <algorithm> using namespace std;
6
2854
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked fine while the file was in the project directory. When the obsolete file was removed from the project directory, my application will no longer compile. Can someone please help with this issue? Thank in advance, Tom
1
5390
by: electrixnow | last post by:
Help!, I need to compile this code with static libs so it run on another XP machine that does'nt have MS Studio installed. When I compile now I get an ERROR: 1>------ Rebuild All started: Project: drawing_control, Configuration: Release Win32 ------ 1>Deleting intermediate and output files for project 'drawing_control', configuration 'Release|Win32'
2
2753
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include <string>
2
5296
Schwack
by: Schwack | last post by:
I've just started learning C++ (got bored at work) and I'm using VC++ to compile some simple code but I get a compile error in test.cpp when using "getline". I've searched the internet and this forum but can't find an answer. I hope that someone can help :-) test.h: #include <iostream> #include <fstream> #include <string> using namespace std; class ReadFile
0
8685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8613
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8908
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4374
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.