Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Dynamic Libraries Static Objects - Linux

Dynamic Libraries Static Objects - Linux

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 417 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Suths
    wrote on 11 Feb 2015, 23:46 last edited by
    #1

    Hi all,

    I currently have a singleton defined in a shared library:
    @InstanceStorage& InstanceStorage::instance()
    {
    static InstanceStorage instance;

    return instance;
    }
    @

    .pro file: @CONFIG += shared@

    I attempt to get the instance of this class in two separate locations:

    • Another Shared Lib
    • A dynamic plugin

    What I'm noticing is that the instance memory address is different in both locations. Any ideas why this might be the case and how I might resolve it?

    1 Reply Last reply
    0

    1/1

    11 Feb 2015, 23:46

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved