HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: aCC Error: Referenced object 'attach' is not a...
Operating System - HP-UX
1825793
Members
2296
Online
109687
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
Forums
Discussions
Discussions
Discussions
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
02-27-2003 02:06 PM
02-27-2003 02:06 PM
aCC Error: Referenced object 'attach' is not a member of class basic_ofstream
Hello,
I'm migrating an application (omniORB) from hp-ux pa-risc to hp-ux Itanium (11.20) and getting an fstream definition error.
Below are the error and code section:
aCC -c -O -w -AA -mt -I /opt/aCC/include_std +DD64 +DSnative -I.
-D__OMNIORB2__ -I../../../stub -DRWSTD_MULTI_THREAD -DRW_MULTI_THREAD
-D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -DDEFAULT_LOGDIR='"/var/omninames"' -
I. -I../../../include -D__ia64__ -D__hpux__ -D__OSVERSION__=11 -ldir log.cc -o log.o
Error 187: "log.cc", line 356 # Referenced object 'attach' is not a member of
class basic_ofstream
logf.attach(fd);
^^^^^^
===========
#if defined(USE_ATTACH_FD)
# ifdef __WIN32__
int fd = _open(active, O_WRONLY | O_APPEND);
# else
int fd = open(active, O_WRONLY | O_APPEND | O_SYNC);
# endif
if (fd < 0) {
cerr << ts.t() << "Error: cannot open log file '" << active
<< "' for writing." << endl;
exit(1);
}
logf.attach(fd);
#else
logf.open(active,ios::out|ios::app,0666);
if (!logf) {
cerr << ts.t() << "Error: cannot open log file '" << active
<< "' for writing." << endl;
exit(1);
}
#endif
==================
It appears that attach is defined in fstream.h but not in the std implementation.
Any suggestions on how to resolve this error are appreciated. What's the equivalent ANSI C++ Standard implementation? I'm new to C++ and hp-ux.
Thanks,
TL
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2003 12:14 PM
09-10-2003 12:14 PM
Re: aCC Error: Referenced object 'attach' is not a member of class basic_ofstream
Hi, TL,
Did you resovle it?
If not, try to add the line
using namespace std;
after
#include
Goo luck.
-Kevin
Did you resovle it?
If not, try to add the line
using namespace std;
after
#include
Goo luck.
-Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2003 12:14 PM
09-10-2003 12:14 PM
Re: aCC Error: Referenced object 'attach' is not a member of class basic_ofstream
Hi, TL,
Did you resovle it?
If not, try to add the line
using namespace std;
after
#include
Good luck.
-Kevin
Did you resovle it?
If not, try to add the line
using namespace std;
after
#include
Good luck.
-Kevin
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.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP