Sponsored Content
Top Forums Programming Issues with two versions of libstdC++.so Post 302889060 by Praveen_218 on Tuesday 18th of February 2014 01:55:21 PM
Old 02-18-2014
Issues with two versions of libstdC++.so

I'm facing an issue in which my program is using a custom library (say, libxyz.so) which is compiled using libstdc++.so.5 and the system I'm using this library to create an executable from my program, has libstdc++so.6 as well as libstdc++.so.5; both available under /usr/lib directory.

There are multiple compilers available with the system (i.e gcc, g++34 and g++ version 4.*, IBM xlc).

When I compile my program, the resultant binary has to link libxyz.so (which has libstdc++.so.5 already) and based on further symbols need, it has to use libstdc++.so, but it by default links with libstdc++.so.6 and these two versions of libstdc++ gets its way into my executable.

This clearly shows up the cross links when done ldd on my executable. The program crashes when run. Because some classes are not compatible in libstdc++.so between versions 5 and 6.

Being C++ program, still I compiled and linked with gcc itself which is by default linking only with libstdc++.so.5 but had to use -fno-use-cxa_exception_ptr as flag to suppress the undefined reference issue on exception handling code. This made my binary having uniform links with libstdc++.so.5 through out and the program runs well. But this is just a work around and not an acceptable solution.

Is there a way, in which we can make g++ (or even g++34) to link explicitly with a particular library version overriding the default behavior to link with the latest version?

In that case I would prefer to link with libstdc++.so.5 through out.

Thanks a lot in advance for your suggestions / insight and for your precious time of course.

Regards,
PraveenK

---------- Post updated at 12:25 AM ---------- Previous update was at 12:05 AM ----------

It would also be great, if you suggest on editing the gcc/g++ compile specs. However that again is not a very open option if this is not an user account specific changes. Although I have the root access but would not be allowed to make system configuration changes.

Last edited by Praveen_218; 02-18-2014 at 02:50 PM.. Reason: Typo errors.
 

8 More Discussions You Might Find Interesting

1. Programming

Link against a particular version of libstdc++

Our development machines have libstdc++.so.5 and libstdc++.so.6. When we build our native code, it uses libstdc++.so.6. Is there anyway I can force it to use libstdc++.so.5 instead ? $ ldd try /usr/lib/libcwait.so (0x00655000) libstdc++.so.6 => /usr/lib/libstdc++.so.6... (5 Replies)
Discussion started by: vino
5 Replies

2. HP-UX

Is there any way to get old HP-UX versions?

I got my hands on a HP9000/380 and need a (really) old version of HP-UX, like 7 or 8. Is there any vendor who sells older versions? I did a quick search here and checked the FAQ and HPs HP-UX site but couldn't find anything. :confused: Any help is appreciated! (4 Replies)
Discussion started by: dlundh
4 Replies

3. AIX

libstdc++.a (libstdc++.so.5) issue on AIX 5.2

hello everybody i am new on the AIX environment and i have faced an issue while running pstill it can't find ibstdc++.a (libstdc++.so.5) although i have the latest GCC and libstdc 4.0.0 i guess. So to resolve the problem i have got an old versions that i want to install on AIX: ... (5 Replies)
Discussion started by: eternalflame
5 Replies

4. Ubuntu

how to recover libstdc++.so.6

Hi! I'm using Ubuntu Karmic and I lost libstdc++.so.6. Is there a way to recover it?.. Thanks in advance (0 Replies)
Discussion started by: Sapfeer
0 Replies

5. Red Hat

Unable to find libstdc++-libc6.2-2.so.3

Hi all, I am working on Red Hat Enterprise Linux ES release 4 (Nahant) with kernel 2.6.9-5 and try to install one application but unable to install it. When I am trying to install it,it is throwing the following error-- To resolve it,I installed gcc 4.0.0 and when I am trying to see gcc... (2 Replies)
Discussion started by: smartgupta
2 Replies

6. UNIX for Dummies Questions & Answers

[Solved] Packages required - Libaio.so.1 - Libstdc++so.6

hi guys I have to install a software that says have theses packages are required Libaio.so.1 Libstdc++so.6 are these default packages for a Suse 11 installation for instance? or do I need to download them to avoid dependency issues thanks a lot ---------- Post updated at 10:00 PM... (0 Replies)
Discussion started by: kopper
0 Replies

7. HP-UX

hpux vnc 4.1.3 libstdc++

It took me a while, but I found the right libsdc++ for the current free vnc 4.1.3, deep in this: http://mirrors.develooper.com/hpux/gcc-3.3.2-11.00.sd.bz Merijn's HP-UX software Download Section for ITRC members is a rich source for old libraries. So if you cannot find the right depot or... (0 Replies)
Discussion started by: DGPickett
0 Replies

8. HP-UX

Versions of HP-UX

Lo guys, I've just started a new department in work and I'm going to be using HP-UX with Vi. The problem is I'm completely new to UNIX, I'm currently learning at work but I only have limited amounts of time on our dev systems. Is it possible to get a free/educational version any where? I don't... (4 Replies)
Discussion started by: john2012
4 Replies
std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >(3cxx)			       std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >(3cxx)

NAME
std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > - SYNOPSIS
Public Types typedef std::ptrdiff_t difference_type typedef std::forward_iterator_tag iterator_category typedef const value_type * pointer typedef const value_type & reference typedef basic_regex< _Ch_type, _Rx_traits > regex_type" typedef match_results< _Bi_iter > value_type Public Member Functions regex_iterator () regex_iterator (_Bi_iter __a, _Bi_iter __b, const regex_type &__re, regex_constants::match_flag_type __m=regex_constants::match_default) regex_iterator (const regex_iterator &__rhs) bool operator!= (const regex_iterator &__rhs) const value_type & operator* () regex_iterator & operator++ () regex_iterator operator++ (int) const value_type * operator-> () regex_iterator & operator= (const regex_iterator &__rhs) bool operator== (const regex_iterator &__rhs) Detailed Description template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>class std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > An iterator adaptor that will provide repeated calls of regex_search over a range until no more matches remain. Definition at line 2238 of file regex.h. Constructor &; Destructor Documentation template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>> std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator () Provides a singular iterator, useful for indicating one-past-the-end of a range. Todo Implement this function. Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>> std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator (_Bi_iter__a, _Bi_iter__b, const regex_type &__re, regex_constants::match_flag_type__m = regex_constants::match_default) Constructs a regex_iterator... Parameters: a [IN] The start of a text range to search. b [IN] One-past-the-end of the text range to search. re [IN] The regular expression to match. m [IN] Policy flags for match rules. Todo Implement this function. Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>> std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator (const regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > &__rhs) Copy constructs a regex_iterator. Todo Implement this function. Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Member Function Documentation template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>> bool std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator!= (const regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > &__rhs) Todo Implement this function. Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>> const value_type& std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator* () Todo Implement this function. Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>> regex_iterator& std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ () Todo Implement this function. Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>> regex_iterator std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ (int) Todo Implement this function. Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>> const value_type* std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator-> () Todo Implement this function. Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>> regex_iterator& std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator= (const regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > &__rhs) Todo Implement this function. Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>> bool std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator== (const regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > &__rhs) Todo Implement this function. Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ Tue Nov 27 2012 std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >(3cxx)
All times are GMT -4. The time now is 12:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy