[PATCH]: creating la files also for static libraries

Thiago Macieira thiago at kde.org
Thu Oct 27 05:59:14 CEST 2005


Ralf Habacker wrote:
>> I mean this: do I have to add the list of libraries used by the
>> libraries I use to the link line? For instance, suppose my program
>> uses A.dll and A links to B.dll (say, kernel32.dll). Do I have to make
>> my link line:
>>
>> 	gcc -o myprog myprog.o -lA -lB (-lkernel32 -ladvapi32 -l...)
>> ?
>>
>> However, we do have a problem with *direct* dependencies, at least
>> with the Solaris linker. The real usecase (bug 115058) is:
>>   my program uses symbols from libvorbis
>>   my program links to libvorbisenc
>>   libvorbisenc links to libvorbis
>
>Is libvorbisenc a static library ? If so, then there should the .dep
> file contains any platform inpendent form of dependencies. The question
> is what form.

No. We're talking strictly dynamic libraries.

You can summarise the error like this:

$ cat test.c
main()
{
  extern vorbis_file_init();
  vorbis_file_init();
}
Solaris$ gcc -o test test.c -lvorbisenc
test.c: undefined symbol 'vorbis_file_init' (implicit from dependency 
libvorbis.so.0)

Linux$ gcc -o test test.c -lvorbisenc
[compilation successful]

>> The consequence of this is that each and every program in KDE *must*
>> list all libraries from which it uses at least one symbol, including
>> Qt and kdecore.
>
>which is the prefered way under windows too, because the linker does not
> have such support.

I agree, but not every devel does. For instance, if the app uses kio, why 
should we list kdecore and kdeui and Qt as well?

I think that you should know what you use. And to help that, I suggested 
using namespaces, but my proposal wasn't accepted.

>The KIO module for example provides the kdesu and kdewalletclient
> library beside the main kio library, although for other reason as you
> stated.

This is completely different.
-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

2. Tó cennan his weorc gearu, ymbe se circolwyrde, wearð se cægbord and se 
leohtspeccabord, and þa mýs cómon lator. On þone dæg, he hine reste.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20051027/8a78c40f/attachment.pgp


More information about the Kde-buildsystem mailing list