Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Sharing data between static library and main executable program

    General and Desktop
    3
    3
    56
    Loading More Posts
    • 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
      supratik123 last edited by

      Hi All I am newbie to Qt. I have created a static library where I am doing some functions and I want some of the variables declared in the static library to be accessible to my main program or the program which I will bind my static library using the includepath and lib. I have heard about Qshared pointer but I am not sure whether it will serve my purpose.
      If anyone can help me in making the variables visible to main program by any other means other than signals and slots , it will be great.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        What variables are these ?
        What is their purpose ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • fcarney
          fcarney last edited by

          Shouldn't this work?

          extern int somevariable;
          

          C++ is a perfectly valid school of magic.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post