[Info-vax] C++ compilation problem
Joukj
joukj at hrem.nano.tudelft.nl
Thu Dec 13 03:33:38 EST 2018
Hi all,
During porting an opensourec package to OpenVMS I encountered a problem
when compiling. What I do is not really standards: I try to create a
single object library with both 32- and 64-variants of the routines. In
many cases my procedure works and for this package I have no problems
when using HP C++ V7.4-005 on OpenVMS IA64 V8.4.
Problems occur when trying the same things using HP C++ V7.3-009 for
OpenVMS Alpha V8.4. First of all I had to add /templ=all to the
compilation in order to get all templates inside the object file and not
in object in the [.CXX_REPOSITORY] directory. This to avoid clashes
between the 32- and 64-bit variants. This caused many templates to
appear "global" in many objects, so I modified [SYSLIB]CXXL$ANSI_DEF.TLB
so that these template got the "inline" attribute
However now I encounterd a case where I do not find a way to get it
"static/local" in the object file.
Full CXX command:
cxx/name=(as_is,short)/float=ieee/ieee=denorm/templ=all
/define=("_READLINE=1","
HAS_IM_CONVERT=1","BLAS_NO_UNDERSCORE=1", "__USE_STD_IOSTREAM=1")
/warn=di
sable=(MAYLOSEDATA,NOTQUACOMPREDEC)
/include=([],[-.Include],[--.SuiteSparse
_config], [--.UMFPACK.Include],[--.AMD.Include],[-.Include],
[--.CHOL
MOD.Include])/list/show=all/point=32/list/show=all Mongoose_Version.cpp
I get
%LIBRAR-E-DUPGLOBAL, global symbol CXXL$RWNLLRFQ13STD64BSCS26AVQ12 from
file $DI
SK16:[joukj.PUBLIC.suitesparse.SuiteSparse-5^.3^.0.Mongoose.Source]Mongoose_Vers
ion.OBJ;18 already in library
$DISK16:[joukj.PUBLIC.suitesparse.SuiteSparse-5^.3
^.0]libsuitespa
$ search [...]CXX$DEMANGLER_DB. CXXL$RWNLLRFQ13STD64BSCS26AVQ12
******************************
$DISK16:[joukj.PUBLIC.suitesparse.SuiteSparse-5^.3^.0.Mongoose.Source.CXX_REPOSI
TORY]CXX$DEMANGLER_DB.;1
CXXL$RWNLLRFQ13STD64BSCS26AVQ12const
_RWrwstd::_RWnull_string_ref_rep<wchar_t, s
td::char_traits<wchar_t> , std::allocator<char> ,
_RWrwstd::_RWstring_ref_rep<st
d::allocator<char> > > std::basic_string<wchar_t,
std::char_traits<wchar_t> , s
td::allocator<char> > ::_RWnullref
If I look in the source listing generated by the compiler the relevant
part shows (note I put the "inline" there
I1 29800 // basic_string<...>::_RWnullref
I1 29801 #ifndef _RWSTD_NO_STATIC_DEF3
I1 29802 template <class charT, class traits, class Allocator >
Source Listing
12-DEC-2018 20:53:40 HP C++ V7.3-009 Page 562
7-DEC-2018 13:54:44 [SYSLIB]CXXL$ANSI_DEF.TLB;16(STRING.CC)
I1 29803 inline const _TYPENAME basic_string<charT, traits,
Allocator>::_RWnull_ref_type
I1 29804 basic_string<charT, traits, Allocator>::_RWnullref;
I1 29805 #endif
But I could find no location where it is actually "defined".
So what do I have to do to actually inline this routine?
regards
Jouk
More information about the Info-vax
mailing list