![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Creating an sql statement from a file. Problem with ' | hannem | Shell Programming and Scripting | 2 | 04-24-2008 08:26 AM |
| creating new files | montana77 | UNIX for Dummies Questions & Answers | 4 | 04-13-2008 02:20 AM |
| Finding files with names that have a real number greater then difined. | harmonwood | Shell Programming and Scripting | 2 | 11-09-2007 10:28 AM |
| Problem with creating big files | eliraza6 | Linux | 6 | 11-06-2007 09:54 AM |
| Deleting specific files greater then 90 days | beilstwh | Shell Programming and Scripting | 2 | 07-22-2004 03:27 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Problem creating files greater than 2GB
With the C code I am able to create files greater than 2GB if I use the 64 bit compile option -D_FILE_OFFSET_BITS=64. There I am using the function fprintf to write into the file. But when I use C++ and ofstream the file is getting truncated when the size grows beyond 2GB. Is there any special compile option needed to overcome this?
My OS is - SunOS 5.8 |
|
||||
|
With the GNU gcc compiler, specifying the "-m64" option generates code for the 64-bit environment which includes 8-bytes for a file offset. I normally use low-level I/O with which you can specify the O_LARGEFILE status flag when working in a 32-bit environment.
In short, try compiling with the -m64 option. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|