Shared vs dynamic libs



  • 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



  • [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]

    [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.



  • Thanks but why not simply use:
    -dynamic

    instead of:

    -shared -rdynamic



  • 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 :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.