HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- C++ template problem with DEC C/C++ compiler V5.6
Operating System - OpenVMS
1830241
Members
1758
Online
109999
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
11-16-2007 10:57 AM
11-16-2007 10:57 AM
C++ template problem with DEC C/C++ compiler V5.6
I have an Alpha system running on OpenVMS V7.1 with DEC C/C++ compiler V5.6. CXXLINK prints an error message "undefined symbol" when I try to link a C++ program using templates. Following is the test.cxx program (by the way this program is compiled and linked OK with HP C++ compiler V6.5).
#include
template void f(T) {
printf("In template f\n");
}
void f(int);
int main() {
f(0);
f(0.0);
return 0;
}
void f(int) {
printf("In non-template f\n");
}
CXX test.cxx ok
CXXLINK test
f(p1);
%CXX-E-UNDECLARED, In this statement, "f" is not declared.
at line number 4 in file [.CXX_REPOSITORY]F__XD.CXX;4
%LINK-W-NUDFSYMS, 1 undefined symbol:
%LINK-I-UDFSYM, void f(double)
%LINK-W-USEUNDEF, undefined symbol void f(double) referenced
*** Please let me know what can I do to get this program to work with C++ compiler V5.6, or do I have to upgrade to newer version of HP CXX compiler.
If I need to upgrade newer version of HP CXX compiler (like V6.0 or above), where can I get the compiler.
Attached is the test.cxx file.
Best regards.
#include
template
printf("In template f\n");
}
void f(int);
int main() {
f(0);
f(0.0);
return 0;
}
void f(int) {
printf("In non-template f\n");
}
CXX test.cxx ok
CXXLINK test
f(p1);
%CXX-E-UNDECLARED, In this statement, "f" is not declared.
at line number 4 in file [.CXX_REPOSITORY]F__XD.CXX;4
%LINK-W-NUDFSYMS, 1 undefined symbol:
%LINK-I-UDFSYM, void f(double)
%LINK-W-USEUNDEF, undefined symbol void f(double) referenced
*** Please let me know what can I do to get this program to work with C++ compiler V5.6, or do I have to upgrade to newer version of HP CXX compiler.
If I need to upgrade newer version of HP CXX compiler (like V6.0 or above), where can I get the compiler.
Attached is the test.cxx file.
Best regards.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2007 01:19 PM
11-16-2007 01:19 PM
Re: C++ template problem with DEC C/C++ compiler V5.6
> [..] C++ compiler V5.6 [...]
Sometimes the "-xxx" in the version matters,
but that one's pretty old, isn't it? ("July
22, 1997", it says in my release notes.)
I know nothing (or almost nothing) about C++,
but I do have one:
alp $ cxx /version
HP C++ V7.3-009 for OpenVMS Alpha V7.3-2
(_Its_ release notes say, "April 3, 2007".)
And, around here:
alp $ cxx 295792.cxx
alp $ cxxlink 295792.obj
alp $ run 295792.exe
In non-template f
In template f
alp $
So, knowing nothing, I'd say that a newer
compiler might help in your case.
Sometimes the "-xxx" in the version matters,
but that one's pretty old, isn't it? ("July
22, 1997", it says in my release notes.)
I know nothing (or almost nothing) about C++,
but I do have one:
alp $ cxx /version
HP C++ V7.3-009 for OpenVMS Alpha V7.3-2
(_Its_ release notes say, "April 3, 2007".)
And, around here:
alp $ cxx 295792.cxx
alp $ cxxlink 295792.obj
alp $ run 295792.exe
In non-template f
In template f
alp $
So, knowing nothing, I'd say that a newer
compiler might help in your case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2007 03:36 PM
11-16-2007 03:36 PM
Re: C++ template problem with DEC C/C++ compiler V5.6
To run experiments with current software
yourself, you might investigate:
http://www.testdrive.hp.com
Only IA64 systems, now, for VMS, but many
things work the same.
yourself, you might investigate:
http://www.testdrive.hp.com
Only IA64 systems, now, for VMS, but many
things work the same.
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