From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,c6f023510904ebe6,start X-Google-Attributes: gidfee84,public X-Google-Thread: 109fba,c6f023510904ebe6,start X-Google-Attributes: gid109fba,public From: "Warren Miller" Subject: Compaq C++ work-around for libcxxstd.a Date: 2000/05/19 Message-ID: <8g3krt$2he$1@tomm.stsci.edu>#1/1 X-Deja-AN: 625436629 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: Space Telescope Science Institute, Baltimore, MD 21218 X-MSMail-Priority: Normal Newsgroups: comp.unix.osf.osf1,comp.lang.c++ Hi, The release notes for Compaq C++ 6.2 recommend a work-around for the situation where linking against a shared library created with cxx produces multiply-defined symbol errors because libcxxstd.a effectively is linked against twice--once during creation of the shared library, and once when linking against the shared library to produce the executable. The work-around is to use the -hidden/-non_hidden flags when building the shared library as in: cxx -hidden /usr/lib/cmplrs/cxx/libcxxstd.a -non_hidden -shared ... We ran into the multiply-defined symbol problem for a handful of executables that link against one of our C++ libraries, so we instituted the work-around and re-built the library. This got rid of the link errors, but now certain executables (not necessarily those that triggered the multiply-defined symbol errors) built this way have become unstable--they dump core in different places in the C++ standard library during string manipulation. If we remove the work-around and restrict testing to those executables that did not suffer from the multiply-defined symbol errors in the first place, they work fine. As soon as we use the work-around and re-link, they crash. Does anyone have some insight into this work-around or have a solution? additional details: Tru64 version: 5.0A cxx version: Compaq C++ V6.2-024 for Compaq Tru64 UNIX V5.0A (Rev. 1094) all source code is compiled using -D__USE_STD_IOSTREAM Thanks. W. Miller