HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- compilation error on HP-UX
Operating System - HP-UX
1832976
Members
2884
Online
110048
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
12-02-2009 01:58 AM
12-02-2009 01:58 AM
compilation error on HP-UX
//tracetest.c
#ifdef VERSANT_ANSI
#include
#include
#include
#include
#include
using namespace std;
using std::ostrstream;
using std::istrstream;
#else
#include
#include
#include
#endif /* VERSANT_ANSI */
void main()
{
............
.....................
const string tooLongMsg(258, 'x');// line no 35
..................................
}
during compilation of this code , I am getting following error
Error (future) 600: "tracetest.c", line 35 # Type specifier is omitted; "int" is no longer assumed.
const string tooLongMsg(258, 'x');
^^^^^
Error 20: "tracetest.c", line 35 # ';' expected before 'tooLongMsg'.
const string tooLongMsg(258, 'x');
^^^^^^^^^^
Error 204: "tracetest.c", line 35 # Uninitialized const variable "const int string".
const string tooLongMsg(258, 'x');
Error 328: "tracetest.c", line 35 # Function 'tooLongMsg' has not been defined yet; cannot call.
const string tooLongMsg(258, 'x');
^^^^^^^^^^
I have included all the required header files need for string type of variable and i am using aCC compiler to compile this program.
I dont know why i am getting this error on
HP-UX only.
can you please help me with this issue
Thanks,
Girish
#ifdef VERSANT_ANSI
#include
#include
#include
#include
#include
using namespace std;
using std::ostrstream;
using std::istrstream;
#else
#include
#include
#include
#endif /* VERSANT_ANSI */
void main()
{
............
.....................
const string tooLongMsg(258, 'x');// line no 35
..................................
}
during compilation of this code , I am getting following error
Error (future) 600: "tracetest.c", line 35 # Type specifier is omitted; "int" is no longer assumed.
const string tooLongMsg(258, 'x');
^^^^^
Error 20: "tracetest.c", line 35 # ';' expected before 'tooLongMsg'.
const string tooLongMsg(258, 'x');
^^^^^^^^^^
Error 204: "tracetest.c", line 35 # Uninitialized const variable "const int string".
const string tooLongMsg(258, 'x');
Error 328: "tracetest.c", line 35 # Function 'tooLongMsg' has not been defined yet; cannot call.
const string tooLongMsg(258, 'x');
^^^^^^^^^^
I have included all the required header files need for string type of variable and i am using aCC compiler to compile this program.
I dont know why i am getting this error on
HP-UX only.
can you please help me with this issue
Thanks,
Girish
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2009 04:39 AM
12-02-2009 04:39 AM
Re: compilation error on HP-UX
> [...] I have included all the required
> header files need for string type of
> variable [...]
Apparently not. Is VERSANT_ANSI defined? If
not, then you'd seem to be getting
, not (and all those other
C++ headers).
> ............
> .....................
A _complete_ test case is easier to test.
> header files need for string type of
> variable [...]
Apparently not. Is VERSANT_ANSI defined? If
not, then you'd seem to be getting
C++ headers).
> ............
> .....................
A _complete_ test case is easier to test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2009 01:02 AM
12-03-2009 01:02 AM
Re: compilation error on HP-UX
>I am using aCC compiler
>I don't know why I am getting this error on HP-UX only.
What is the version of aC++ you are using and what architecure?
If you are on PA, you'll probably need to use -DVERSANT_ANSI and -AA.
>void main()
This is illegal. It must be changed to: int main()
>I don't know why I am getting this error on HP-UX only.
What is the version of aC++ you are using and what architecure?
If you are on PA, you'll probably need to use -DVERSANT_ANSI and -AA.
>void main()
This is illegal. It must be changed to: int main()
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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP