Re: Static and dynamic linkage
[EMAIL PROTECTED] wrote: > > Which would mean having to deal with SQLite as a dependency of this > package... > I have similar problem with ScummVM. I really do not want to deal with all the dependencies and maintain them in Maemo extras repository so I am linking libmad, Tremor, FLAC, libmpeg etc. statically. I don't know how to easily solve static vs dynamic linking flags too so my solution was to compile and install all those libraries inside scratchbox only statically (i.e. no .so, just .a) and point scummvm to them so linker does not find their dynamic libraries at all. Then you don't need to mess with linking flags and package builds fine. Frantisek ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Static and dynamic linkage
On Thu, 29 Nov 2007, Guillem Jover wrote: > Better do something like: > > $ gcc -o test \ > -lsomedynamiclib \ > -Wl,-Bstatic -lsomestaticlib -Wl,-Bdynamic \ > -lsomeotherdynamiclib \ > ... > > > > Specifically, I want to statically link in the SQLite library but leave > > > the rest of the linkage as is. > > I'd say better not to statically link at all. Which would mean having to deal with SQLite as a dependency of this package... -- Aj. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Static and dynamic linkage
On Wed, 28 Nov 2007, Eero Tamminen wrote: > Just specify the static library you want to link with: > gcc -o test -lsomedynamiclib my-static-libs/foobar.a Using autotools? -- Aj. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Static and dynamic linkage
On Wed, 2007-11-28 at 10:19:17 +0200, ext Eero Tamminen wrote: > [EMAIL PROTECTED] wrote: > > Is there a standard way to ask for a specific library to be linked in > > statically and the rest to be dynamic? > > Just specify the static library you want to link with: > gcc -o test -lsomedynamiclib my-static-libs/foobar.a Better do something like: $ gcc -o test \ -lsomedynamiclib \ -Wl,-Bstatic -lsomestaticlib -Wl,-Bdynamic \ -lsomeotherdynamiclib \ ... > > Specifically, I want to statically link in the SQLite library but leave > > the rest of the linkage as is. I'd say better not to statically link at all. regards, guillem ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Static and dynamic linkage
[EMAIL PROTECTED] wrote: > Is there a standard way to ask for a specific library to be linked in > statically and the rest to be dynamic? > > Specifically, I want to statically link in the SQLite library but leave > the rest of the linkage as is. > It may work in your case but in general there may be unexpected issues when mixing this especially when using c++ check http://www.trilithium.com/johan/2005/06/static-libstdc/ Also in plain C linking some library foo statically while linking other library bar dynamically that is already linked dynamically to foo (and similar variations of this when using multiple dependent libraries) may give you unexpected issues both at link time and also later at run time. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Static and dynamic linkage
Hi, ext [EMAIL PROTECTED] wrote: > Is there a standard way to ask for a specific library to be linked in > statically and the rest to be dynamic? Just specify the static library you want to link with: gcc -o test -lsomedynamiclib my-static-libs/foobar.a > Specifically, I want to statically link in the SQLite library but leave > the rest of the linkage as is. - Eero ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Static and dynamic linkage
Is there a standard way to ask for a specific library to be linked in statically and the rest to be dynamic? Specifically, I want to statically link in the SQLite library but leave the rest of the linkage as is. -- A ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers