Hi Karl, If you have a system with gcc3.2 and libstdc++.5, a bug has been reported to the gcc people, see: http://lists.debian.org/debian-gcc/2003/debian-gcc-200311/msg00110.html http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8610 This bug appears when using ifstream. I also faced the same problem when implementing support for large files in ROOT version 4.0 (yes, we support large files now). Using directly the C library with fopen64, stat64, lseek64, etc works perfectly. Rene Brun Karl Hauschild wrote: > > Hi, > > Could someone either verify that there is a problem with > Large File Support using gcc > 3.2 or tell me what I need > to do to get Large File Support using C++. > > I have used..... > > int OpenLarge() { > //Data files > ifstream dataFile; //C++ style io > FILE *fin; //C style io > > //try reading in c-formatted > if ((fin = fopen("newtest.out","r")) == NULL) > return -1; > > cout << "Opened c-style" << endl; > fclose(fin); > > //try C++ io > dataFile.open("newtest.out", ios::in); > if(dataFile) > cout << "Opened c++style" << endl; > else > return -2; > > return 1; > } > > and in the Makefile have > > OVER2GIGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE > CXXFLAGS = -O2 -fPIC -Wunused -Winline $(ATHLON) $(OVER2GIGS)
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET