VYRESENO: Re: ld: cannot open -lXpm.so: No such file or directory

David Sauer davids na iol.cz
Středa Leden 20 16:24:16 CET 1999


>>>> "MK" == Michal Krause <mike na navrcholu.cz> writes:

    >> Žil jsem poměrně spokojeně v přesvědčení, že pokud není použito -Bstatic
    >> ld se pokusí  linkovat nejprve přímo s dynamickými knihovnami a symboly které tam
    >> nenalezne bude hledat ve statických knihovnách ... takže pokud jsou
    >> všechny symboly definovány v .so, .a se vůbec nepoužije...

    MK> Nechci kecat, ale tohle je z man gcc u volby -llibrary:

    MK> The linker searches a standard list of directories for the library, which is
    MK> actually a file named 'liblibrary.a'. The linker then uses this file as if it
    MK> had been specified precisely by name. 

Myslím, že manpage asi bude už trochu out-date. Info dokumentace
příkazu ld říká:

`-lARCHIVE'
`--library=ARCHIVE'
     Add archive file ARCHIVE to the list of files to link.  This
     option may be used any number of times.  `ld' will search its
     path-list for occurrences of `libARCHIVE.a' for every ARCHIVE
     specified.

     On systems which support shared libraries, `ld' may also search for
     libraries with extensions other than `.a'.  Specifically, on ELF
                                                                  ^^^
                                 
     and SunOS systems, `ld' will search a directory for a library with
     an extension of `.so' before searching for one with an extension of
     `.a'.  By convention, a `.so' extension indicates a shared library.

        [zbytek odstavce odříznut]

P.S.: do je pohoda, mít konečně háčky a čárky ....
-- 
* David Sauer, student of Czech Technical University
* electronic mail: davids na iol.cz (mime compatible)



Další informace o konferenci Linux