[OSy] Statické linkování

Petr Tuma petr.tuma at dsrg.mff.cuni.cz
Fri Dec 14 09:11:25 CET 2007


Zdravim,

zkuste misto -llibrt.a napsat jen -lrt ? Viz manual k ld:

`-lNAMESPEC'
`--library=NAMESPEC'
      Add the archive or object file specified by NAMESPEC to the list
      of files to link.  This option may be used any number of times.
      If NAMESPEC is of the form `:FILENAME', `ld' will search the
      library path for a file called FILENAME, otherise it will search
      the library path for a file called `libNAMESPEC.a'.

Petr Tuma

Lukáš Kopenec wrote:
> Zdravím!
> 
> Vím, že je to trošku RTFM dotaz, ale je to poprvé, co jsem donucen víc 
> pracovat s gcc a nedaří se mi najít tu správnou kombinaci optionů pro 
> statické slinkování procesu s knihovnou librt.a. Nemohl by mi někdo poradit, 
> jak na to?
> Poslední kombinace, ke které jsem dospěl je LDFLAGS = -T 
> ../Librt/binary.lds -G 0 -static -L ../Librt -llibrt.a -g, ale gcc hlásí 
> cannot find -llibrt.a (mezera mezi -l a librt.a to taky neřeší).
> 
> Předem moc děkuju za pomoc.
> Lukáš 
> 
> 
> _______________________________________________
> OSy mailing list
> OSy at dsrg.mff.cuni.cz
> https://dsrg.mff.cuni.cz/mailman/listinfo/osy

-- 
Petr Tuma
Distributed Systems Research Group
Department of Software Engineering
Faculty of Mathematics and Physics
Charles University, Czech Republic
   http://dsrg.mff.cuni.cz/~ceres




More information about the NSWI004 mailing list