- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Large file support on hp-gcc-4.4.3
Operating System - HP-UX
1755016
Members
2633
Online
108828
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2011 02:49 AM
тАО03-07-2011 02:49 AM
Hi,
I'm have a program that runs on a HP server 11.11. This program reads and writes files, but i haven't noticed that it cannot open large files (>2Gb). I have tried flags -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 but it doesn't work.
Here is how i open the files:
#include
#include
using namespace std;
int main(int argc, char* argv[])
{
fstream file;
if (argc < 2) {
cout << "Usage: " << argv[0] << " filename" << std::endl;
exit(1);
}
file.open(argv[1], ios::in);
if (!file)
{
cout << "Input file " << argv[1] << " not found.\n";
exit(1);
} else {
cout << "Input file " << argv[1] << " opened.\n";
}
return 0;
}
Any idea how to use fstream to open >2gb files?
Thanks
Carlos
I'm have a program that runs on a HP server 11.11. This program reads and writes files, but i haven't noticed that it cannot open large files (>2Gb). I have tried flags -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 but it doesn't work.
Here is how i open the files:
#include
#include
using namespace std;
int main(int argc, char* argv[])
{
fstream file;
if (argc < 2) {
cout << "Usage: " << argv[0] << " filename" << std::endl;
exit(1);
}
file.open(argv[1], ios::in);
if (!file)
{
cout << "Input file " << argv[1] << " not found.\n";
exit(1);
} else {
cout << "Input file " << argv[1] << " opened.\n";
}
return 0;
}
Any idea how to use fstream to open >2gb files?
Thanks
Carlos
Solved! Go to Solution.
- Tags:
- largefiles
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2011 03:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2011 04:06 AM
тАО03-07-2011 04:06 AM
Re: Large file support on hp-gcc-4.4.3
Thanks, but it's really bad for me as i need to change a lot of thing in the code to accommodate this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2011 04:37 AM
тАО03-07-2011 04:37 AM
Re: Large file support on hp-gcc-4.4.3
>it's really bad for me as I need to change a lot of thing in the code
I suppose you could download the g++ runtime source and implement large files. It wouldn't be binary compatible.
I suppose you could download the g++ runtime source and implement large files. It wouldn't be binary compatible.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP