Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3613790
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:10:05+00:00 2026-05-18T22:10:05+00:00

I have some scenario like this: Product-> Platform-> mylibs(version-1) Product-> mylibs(version-2) i.e Product uses

  • 0

I have some scenario like this:

Product-> Platform-> mylibs(version-1)

Product-> mylibs(version-2)

i.e Product uses mylibs (version-2) directly. Product also uses platform (which is also a dynamic lib) and platform uses my libs (version-1).

The names of the libs used by product and platform are same. Only versions are different and both these versions are not compatible.

Is there a way with “.so” libs in linux that Platform can link to one version and product can link to another version of the same libs having the same name?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:10:06+00:00Added an answer on May 18, 2026 at 10:10 pm

    Note, even changing the names of the libs won’t be enough by default, as symbol names would conflict.
    Your libs should use soname and versioned symbols, in which case they can even be called the same.

    $ make
    gcc -shared -fpic -Wl,-soname -Wl,libmylibs.so.1 -Wl,--default-symver -o libmylibs.so.1 mylibs1.c
    gcc -shared -fpic -Wl,-soname -Wl,libmylibs.so.2 -Wl,--default-symver -o libmylibs.so.2 mylibs2.c
    gcc -shared -fpic -Wl,-soname -Wl,libplatform.so.1  -Wl,--default-symver -Wl,--default-imported-symver -o libplatform.so.1 platform.c libmylibs.so.1
    gcc  -Wl,-rpath-link -Wl,. -Wl,--default-imported-symver  -o program program.c libplatform.so.1 libmylibs.so.2
    /usr/bin/ld: warning: libmylibs.so.1, needed by libplatform.so.1, may conflict with libmylibs.so.2
    $ LD_LIBRARY_PATH=$PWD ldd ./program
        linux-vdso.so.1 =>  (0x00007fff1e3ff000)
        libplatform.so.1 => /tmp/so-4539442/libplatform.so.1 (0x00007f6dc3ba0000)
        libmylibs.so.2 => /tmp/so-4539442/libmylibs.so.2 (0x00007f6dc399f000)
        libc.so.6 => /lib/libc.so.6 (0x00007f6dc364c000)
        libmylibs.so.1 => /tmp/so-4539442/libmylibs.so.1 (0x00007f6dc344b000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f6dc3da1000)
    $ LD_LIBRARY_PATH=$PWD ./program
    lib version 2, platform lib version 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a classic Order -> Order Row scenario something like this: public class
I have one question regarding trigger. The scenario is like this Create Procedure begin
I have some scenario like below : /** * @ORM\Entity * @ORM\Table(name=role) */ class
I have some model classes like Customer , Product , etc. in my project
Scenerio: I have some divs populated through foreach loop like below <div id=div1><input type=hidden
My scenario is that I have some payment transaction data in MySQL and some
We have a scenario where some .NET code is attempting to access the current
I have a 'simple' scenario: Read some JSON file, Filter or change some of
Skip to the specific question as needed. Some background: The scenario: I have a
Scenario: I have a view that has some DataTemplate resources <DataTemplate x:Key=myDragCueTemplate> <Border Background=Blue

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.