This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

problem with egcs...


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]