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

  • Home
  • SEARCH
  • 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 8530123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:11:16+00:00 2026-06-11T09:11:16+00:00

I have 3 things: open source application (let’s call it APP), closed source shared

  • 0

I have 3 things: open source application (let’s call it APP),
closed source shared library (let’s call it OPENGL)
and open source plugin for OPENGL (let’s call it PLUGIN)[also shared library].
OS: Linux.

There is need to share data between APP and PLUGIN,
so APP linking with PLUGIN, and when I run it,
system load it automatically.

After that APP call eglInitialize that belongs to OPENGL,
and after that this function load PLUGIN again.

And after that I have two copies of PLUGIN in the APP memory.

I know that because of PLUGIN have global data, and after debugging
I saw that there are two copies of global data.

So question how I can fix this behaviour?
I want one instance of PLUGIN, that used by APP and OPENGL.
And I can not change OPENGL library.

  • 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-06-11T09:11:18+00:00Added an answer on June 11, 2026 at 9:11 am

    I suspect that OPENGL is loading PLUGIN with the RTLD_LOCAL flag. This
    is normally what you want when loading a plugin, so that multiple
    plugins don’t conflict.

    We’ve had similar problems with loading code under Java: we’d load a
    dozen or so different modules, and they couldn’t communicate with one
    another. It’s possible that our solution would work for you: we wrote a
    wrapper for the plugin, and told Java that the wrapper was the plugin.
    That plugin then loaded each of the other shared objects, using dlopen
    with RTLD_GLOBAL. This worked between plugins. I’m not sure that it
    will allow the plugins to get back to the main, however (but I think it
    should). And IIRC, you’ll need special options when linking main for
    its symbols to be available. I think Linux treats the symbols in main
    as if main had been loaded with RTLD_LOCAL otherwise. (Maybe
    --export-dynamic? It’s been a while since I’ve had to do this, and I
    can’t remember exactly.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imagine the next architecture: We have Java application over Spring framework (let's call it
I have an open source Java application that uses Hibernate and HSQLDB for persistence.
We have a Linux server application that is comprised of a number of open-source
I have written some code that makes use of an open source library to
I have a few different things open in the terminal whenever I'm developing --
I understand that in CUDA's memory hierachy, we have things like shared memory, texture
For instance, let's say I have a User model. Users have things like logins,
I have some things in my app that I need to store, in order
I'm making an app where I have different things: images, videos,a viewController(.h and .m)
I have intended to have an app. where I want to have different things

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.