This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
problem with egcs...
- To: gcc at gcc dot gnu dot org
- Subject: problem with egcs...
- From: Steve Ettorre <sme at nycap dot rr dot com>
- Date: Wed, 22 Dec 1999 02:26:18 +0000
I just installed RH6.1 which includes egcs-1.1.2-24. I have noticed that
the compiler now seems to have problems with file streams. I compile the
following code (main.cpp) and load the following code with g++:
#include <iostream>
#include <fstream>
#include <iomanip>
#include <stdlib.h>
using namespace std;
int nvert,nnode,nedge,nfedge,nface;
float *xv,*yv,*zv;
int *edge_v1,*edge_v2,*fedge_e,*fedge_f,*f_n1,*f_n2;
void read_grid(ifstream &);
void main() {
// ifstream constructor opens the file
int ivert;
ifstream infile("unphase.grid",ios::in); // default is
input
if(!infile) {
cerr << "File: unphase.grid could not be opened!" <<
endl;
exit (1);
}
read_grid(infile);
}
I get the following linker error:
main.o: In function `main':
/.../main.cpp:24: undefined reference to `__eh_pc'
collect2: ld returned 1 exit status
make: *** [readg] Error 1
Line 24 in main.cpp above is: "read_grid(infile)".
Can anyone shed some light on what I am doing wrong?
Thanx,
Steve
--
Steve Ettorre
e-mail: sme@nycap.rr.com