HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- this declaration may not have extern "C" linkage w...
Operating System - Linux
1827630
Members
3524
Online
109966
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
01-01-2008 11:14 PM
01-01-2008 11:14 PM
this declaration may not have extern "C" linkage while porting C++ code from sunos to HP
Hi,
Im porting a source code base from sunos to HP-UX. While compiling
some sources, Im getting the errors like
/opt/aCC/include/rw/xphasht.h", line 161: error #2800: this
declaration may not have extern "C" linkage
template class RWTExport RWTPtrHashTableIterator;
"/opt/aCC/include/rw/xphasht.h", line 173: error #2800: this
declaration may not have extern "C" linkage
template class RWTExport RWTPtrHashTable
/opt/aCC/include/rw/xpslist.cc", line 416: error #2800: this
declaration may not have extern "C" linkage
template RWTPtrSlink*
Is there some changes required while using roguewave libraries on HP?
The compile command is
aCC -w -Aa -AP -library=std,rwtools7,stream,Csup +p +Z -DUNIX -DSYSV -
D_XOPEN_SOURCE
-D_POSIX_SOURCE -D_HPUX_SOURCE -DRW_NO_STL -DINF_UNIX_SRC -DINF_N_MENU
-D__EXTERN_C__
-DAR_CPLUSPLUS -D__COMP_FILE__=
Please help.
Im porting a source code base from sunos to HP-UX. While compiling
some sources, Im getting the errors like
/opt/aCC/include/rw/xphasht.h", line 161: error #2800: this
declaration may not have extern "C" linkage
template
"/opt/aCC/include/rw/xphasht.h", line 173: error #2800: this
declaration may not have extern "C" linkage
template
/opt/aCC/include/rw/xpslist.cc", line 416: error #2800: this
declaration may not have extern "C" linkage
template
Is there some changes required while using roguewave libraries on HP?
The compile command is
aCC -w -Aa -AP -library=std,rwtools7,stream,Csup +p +Z -DUNIX -DSYSV -
D_XOPEN_SOURCE
-D_POSIX_SOURCE -D_HPUX_SOURCE -DRW_NO_STL -DINF_UNIX_SRC -DINF_N_MENU
-D__EXTERN_C__
-DAR_CPLUSPLUS -D__COMP_FILE__=
Please help.
- Tags:
- linkage
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2008 07:20 AM
01-02-2008 07:20 AM
Re: this declaration may not have extern "C" linkage while porting C++ code from sunos to HP
It helps if you mention your OS, 11.23? And your compiler version, aCC6?
Your problem may be due to the fact that is never a good idea to use this coding pattern:
extern "C" {
#include some file that includes unknown others
}
The proper form is:
extern "C" {
...
}
#include ...
extern "C" {
...
}
All of the aC++ headers and most system headers are already C++ified and adding an extern "C" block will just mess up overloading.
>Is there some changes required while using roguewave libraries on HP?
You're using tools.h++?
>The compile command is: aCC -w -Aa -AP
For IPF, the default is almost -AA. You shouldn't be using the -AP libs and should use -AA explicitly. Which may require a port to -AA if you ever plan to use third party shlibs.
>-library=std,rwtools7,stream,Csup
This is the wrong format for -l and you should let the compiler add the default aC++ runtime shlibs.
You may have to add -lrwtools7? Is this your shlib?
>-DRW_NO_STL
This is NOT supported with HP's version of tools.h++.
Your problem may be due to the fact that is never a good idea to use this coding pattern:
extern "C" {
#include some file that includes unknown others
}
The proper form is:
extern "C" {
...
}
#include ...
extern "C" {
...
}
All of the aC++ headers and most system headers are already C++ified and adding an extern "C" block will just mess up overloading.
>Is there some changes required while using roguewave libraries on HP?
You're using tools.h++?
>The compile command is: aCC -w -Aa -AP
For IPF, the default is almost -AA. You shouldn't be using the -AP libs and should use -AA explicitly. Which may require a port to -AA if you ever plan to use third party shlibs.
>-library=std,rwtools7,stream,Csup
This is the wrong format for -l and you should let the compiler add the default aC++ runtime shlibs.
You may have to add -lrwtools7? Is this your shlib?
>-DRW_NO_STL
This is NOT supported with HP's version of tools.h++.
- Tags:
- tools.h++
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