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]
- 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.
- what does -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 :)