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. Shared vs dynamic libs
QtWS25 Last Chance

Shared vs dynamic libs

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.6k 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.
  • M Offline
    M Offline
    mike4
    wrote on last edited by
    #1

    Hi
    I saw that below with another project. What exactly is that? shared would need some *.so to go with? But there’s only the executable shipped.

    • what does -rdynamic?

    • " -ggdb?

    • with -shared *.so libs should be shipped with the executable?

    Thanks Michael

    LNFLAGS+=-shared -rdynamic -nodefaultlibs -m32 -ggdb -L/usr/lib32 -L../libavionics -L../libogl -L$(LUAJIT)/lib

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      [quote author="mike4" date="1312277498"]Hi
      I saw that below with another project. What exactly is that? shared would need some *.so to go with? But there’s only the executable shipped.[/quote]The executable probably depends on the system versions of the shared object.

      [quote]

      • what does -rdynamic?
        [/quote]
        My guess: It enables "dynamic relocation":http://en.wikipedia.org/wiki/Relocation_(computer_science) or something like that. It is only available in shared objects.

      [quote]

      • " -ggdb?
        [/quote]Add debugging symbols for GDB

      [quote]

      • with -shared *.so libs should be shipped with the executable?
        [/quote]

      The ones not likely to be found installed on the target system (those in your project). Libraries like Qt can be held required and are not expected to be delivered with your application or library.

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mike4
        wrote on last edited by
        #3

        Thanks but why not simply use:
        -dynamic

        instead of:

        -shared -rdynamic

        1 Reply Last reply
        0
        • F Offline
          F Offline
          Franzk
          wrote on last edited by
          #4

          Legacy probably. I think -shared -rdynamic was required first, then the gcc people found it was used together a lot and introduced -dynamic which is synonymous to the other version. The original was left available to not break older builds.

          But that's just assuming :)

          "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0

          • Login

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