🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #16369

Re: Compilar librerias estaticamente...

#16369
From: batsman
Date: Tue, 25 Apr 2000 00:00
44 lines
2568 bytes
-----BEGIN PGP SIGNED MESSAGE-----


    >>>> Santiago Romero escribi� en es.comp.os.linux.programacion:

>
> Enas. Estoy haciendo unos programillas con SDL y dado que adem�s
> de SDL voy a usar tambien otras librerias como SDL_image o SDL_net,
> me gustar�a saber como compilar estaticamente una determinada libreria
> pero no las demas. Es decir, quiero meter estaticamente SDL_image
> pero dejar las demas dinamicas.
>
> He probado a usar un solo -static, pero me da errores de compilaci�n
> cuando sin el static no da ninguno :?

Si pones -static intentar� enlazar est�ticamente *todas* las librer�as. Lo que
tienes que hacer es incluir la librer�a en cuesti�n directamente entre los
objetos a enlazar, as�:

	gcc -o pedazo_de_juego juego.o super_frobnicaction.o \
		/usr/lib/libSDL_image.a -lSDL_net ...

- -- 
              _           _                             
             | |__   __ _| |_ ___ _ __ ___   __ _ _ __  
             | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ 
             | |_) | (_| | |_\__ \ | | | | | (_| | | | |
             |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|

             Real email: batsman dot geo at yahoo dot com

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: Public key via email: send mail with Subject: [PGPKEY]

iQEVAwUBOQYbU70Y27yr0iefAQHKqAf/b0j30mZfXvPt40hUjn6qawumqSSqDbqs
+/XcWIl5eOHqre2qybXyWXEIxokIT1EEA6NgKDutwPTrnIzCykwjRl+mYhIjuCpz
FDzo0RBQ6kfsfXD73a7mZSa25hsHco5vvu3E7Wc5N7lT4dXfEp97430jkhxS0eEv
K5istYzBn6brJAe4gdAxdMsUd6Ay2R6Yb7VhnJV1oe2mjcfn+JzH7Cqcswt+5x3B
PhHQe1pmfT8clqS05uUim3oaqEkeqDtYwBAxh65DRYxAs2S9ZsO/64vte5Hj/p5D
5LJyZZ/BnVoDw9fBklxe+BE3bWGiFao9IQogjFt8pf/D+OmgIYX2rw==
=LHl/
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <o065e8.ss.ln@simpsons4ever>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <slrn8g9ism.kq.nop@compiler.linux.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,c6051bfab0baecf9
X-Google-Attributes: gidf86c8,public
From: batsman@simpsons.for.ever (batsman)
Subject: Re: Compilar librerias estaticamente...
Date: 2000/04/25
Message-ID: <o065e8.ss.ln@simpsons4ever>
X-Deja-AN: 615631916
Content-Transfer-Encoding: 8bit
References: <slrn8g9ism.kq.nop@compiler.linux.es>
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: abuse@news.wanadoo.es
X-Trace: m2newsread.uni2.es 956697519 62.36.41.95 (Tue, 25 Apr 2000 23:18:39 MET DST)
Organization: Wanadoo Usenet News - Visita http://www.wanadoo.es/
Mime-Version: 1.0
User-Agent: slrn/0.9.5.3 (UNIX)
Reply-To: see_signature-mira_firma
NNTP-Posting-Date: Tue, 25 Apr 2000 23:18:39 MET DST
Newsgroups: es.comp.os.linux.programacion