- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Strange behavor of HP C++
Operating System - OpenVMS
1753511
Members
4972
Online
108795
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
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-06-2009 04:02 AM
тАО02-06-2009 04:02 AM
Strange behavor of HP C++
Hello.
I'm simply compiling 2 sources then making library.
---------------------------------------------------
$CXX /INCLUDE=([],[-],[--.include]) /DEFINE=(__USE_STD_IOSTREAM)/WARN=DIS=EXTRASEMI/DEB /LIST/SHOW=ALL UFSCOMMON.CC
$CXX /INCLUDE=([],[-],[--.include]) /DEFINE=(__USE_STD_IOSTREAM)/WARN=DIS=EXTRASEMI/DEB /LIST/SHOW=ALL STOREFSUFS.CC
$LIB/CREA UFS.OLB UFSCOMMON.OBJ,STOREFSUFS.OBJ
%LIBRAR-E-DUPGLOBAL, global symbol STRINGHASWHITESPACE from file STOREFSUFS.OBJ;1 already in library
----------------------------------------------------
It is mean that the global STRINGHASWHITESPACE
already in library, i.e. function statement is present in both UFSCOMMON.CC and STOREFSUFS.CC
Ok.
Looking to the compilation listing:
--------------------------------------------------
$ SEARCH UFSCOMMON.LIS stringHasWhitespace
I3 46190 SQUIDCEXTERN int stringHasWhitespace(const char *);
E extern "C" int stringHasWhitespace(const char *);
I1 50774 stringHasWhitespace(const char *s)
--------------------------------------------------
We can see in at the line 46190 a function describing as
"extern "C" int stringHasWhitespace(const char *); and then at the line 50774 function code statement "stringHasWhitespace(const char *s)" that name is treated as global symbol of course. (Need to say that the same statement is in STOREFSUFS.LIS). So duplicate name reason is in our eyes.
Ok.
But I split compilation process into preprocessor stage and compilation itself via /PREP key:
---------------------------------------------------
$CXX /INCLUDE=([],[-],[--.include]) /DEFINE=(__USE_STD_IOSTREAM)/WARN=DIS=EXTRASEMI /DEB /LIST/SHOW=ALL /PREP UFSCOMMON.CC
$CXX /LIS=ufscommon_ixx.lis UFSCOMMON.IXX
$CXX /INCLUDE=([],[-],[--.include]) /DEFINE=(__USE_STD_IOSTREAM)/WARN=DIS=EXTRASEMI /DEB /LIST/SHOW=ALL /PREP STOREFSUFS.CC
$CXX /LIS=STOREFSUFS_IXX.LIS STOREFSUFS.IXX
$SEARCH UFSCOMMON_IXX.LIS stringHasWhitespace
36045 extern "C" int stringHasWhitespace(const char *);
-----------------------------------------------
How can you see, THERE IS NO function statement "stringHasWhitespace(const char *s)"
(as it really should be)
And then I can make library without problems:
$LIB/CREA UFS.OLB UFSCOMMON.OBJ,STOREFSUFS.OBJ
Any suggestions??
I'm simply compiling 2 sources then making library.
---------------------------------------------------
$CXX /INCLUDE=([],[-],[--.include]) /DEFINE=(__USE_STD_IOSTREAM)/WARN=DIS=EXTRASEMI/DEB /LIST/SHOW=ALL UFSCOMMON.CC
$CXX /INCLUDE=([],[-],[--.include]) /DEFINE=(__USE_STD_IOSTREAM)/WARN=DIS=EXTRASEMI/DEB /LIST/SHOW=ALL STOREFSUFS.CC
$LIB/CREA UFS.OLB UFSCOMMON.OBJ,STOREFSUFS.OBJ
%LIBRAR-E-DUPGLOBAL, global symbol STRINGHASWHITESPACE from file STOREFSUFS.OBJ;1 already in library
----------------------------------------------------
It is mean that the global STRINGHASWHITESPACE
already in library, i.e. function statement is present in both UFSCOMMON.CC and STOREFSUFS.CC
Ok.
Looking to the compilation listing:
--------------------------------------------------
$ SEARCH UFSCOMMON.LIS stringHasWhitespace
I3 46190 SQUIDCEXTERN int stringHasWhitespace(const char *);
E extern "C" int stringHasWhitespace(const char *);
I1 50774 stringHasWhitespace(const char *s)
--------------------------------------------------
We can see in at the line 46190 a function describing as
"extern "C" int stringHasWhitespace(const char *); and then at the line 50774 function code statement "stringHasWhitespace(const char *s)" that name is treated as global symbol of course. (Need to say that the same statement is in STOREFSUFS.LIS). So duplicate name reason is in our eyes.
Ok.
But I split compilation process into preprocessor stage and compilation itself via /PREP key:
---------------------------------------------------
$CXX /INCLUDE=([],[-],[--.include]) /DEFINE=(__USE_STD_IOSTREAM)/WARN=DIS=EXTRASEMI /DEB /LIST/SHOW=ALL /PREP UFSCOMMON.CC
$CXX /LIS=ufscommon_ixx.lis UFSCOMMON.IXX
$CXX /INCLUDE=([],[-],[--.include]) /DEFINE=(__USE_STD_IOSTREAM)/WARN=DIS=EXTRASEMI /DEB /LIST/SHOW=ALL /PREP STOREFSUFS.CC
$CXX /LIS=STOREFSUFS_IXX.LIS STOREFSUFS.IXX
$SEARCH UFSCOMMON_IXX.LIS stringHasWhitespace
36045 extern "C" int stringHasWhitespace(const char *);
-----------------------------------------------
How can you see, THERE IS NO function statement "stringHasWhitespace(const char *s)"
(as it really should be)
And then I can make library without problems:
$LIB/CREA UFS.OLB UFSCOMMON.OBJ,STOREFSUFS.OBJ
Any suggestions??
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-06-2009 07:07 AM
тАО02-06-2009 07:07 AM
Re: Strange behavor of HP C++
The usual trigger for the DUPGLOBAL is the librarian seeing duplicate globals declared.
Check the full compiler listings for the modules, and see what's getting declared.
If that doesn't help, please post up a (small) reproducer of this case. (I really don't want to wade through all of downloading and unpacking and configuring what I presume is Squid here to build a reproducer myself.)
Please also post up the compiler version and OpenVMS version and architecture.
Check the full compiler listings for the modules, and see what's getting declared.
If that doesn't help, please post up a (small) reproducer of this case. (I really don't want to wade through all of downloading and unpacking and configuring what I presume is Squid here to build a reproducer myself.)
Please also post up the compiler version and OpenVMS version and architecture.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2009 05:02 AM
тАО02-07-2009 05:02 AM
Re: Strange behavor of HP C++
Should find solution at another place
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