🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Librerias SDL

#6841
From: Erich Lerch
Date: Thu, 08 May 2003 20:31
23 lines
1810 bytes
* Eusebio Rubio <euruba@ya.com>:
>               Estoy intentando aprender a manejar las librerias SDL y tengo 
> el siguiente problemilla. Creo un fichero prueba.c e incluyo  #include 
><SDL/SDL.h> en la cabecera. Pero al compilar  con gcc prueba.c -o prueba me 
> dice lo siguiente:
>          tmp/cc2IHNSL.o: In function `main':
>         /tmp/cc2IHNSL.o(.text+0x16): undefined reference to `SDL_Init'
>         /tmp/cc2IHNSL.o(.text+0x28): undefined reference to `SDL_GetError'
>         /tmp/cc2IHNSL.o(.text+0x51): undefined reference to `SDL_Quit'
>         collect2: ld returned 1 exit status
> 
Con SDL viene un script que se llama "sdl-config", y te ayuda a
compilar con las opciones que hagan falta.

Yo lo hago as�:

gcc -o prueba.c `sdl-config --cflags --libs` -o prueba

saludos,
e.
-- 
Erich Lerch
GnuPG-Key: http://lerchs.org/gpglerch.asc
Technical Details
Message-ID: <slrnbblfl7.16l.lerch.news@gurb.mine.nu>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!183.red-80-38-46.pooles.rima-tde.NET!not-for-mail
References: <b9ed94$ic70m$1@ID-180372.news.dfncis.de>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,2e9f8495a5c3f3a6
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-05-08 13:31:50 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!183.red-80-38-46.pooles.rima-tde.NET!not-for-mail
From: Erich Lerch <lerch.news@gmx.ch>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Librerias SDL
Date: Thu, 08 May 2003 20:31:35 -0000
Organization: http://lerchs.org
Lines: 23
Message-ID: <slrnbblfl7.16l.lerch.news@gurb.mine.nu>
References: <b9ed94$ic70m$1@ID-180372.news.dfncis.de>
NNTP-Posting-Host: 183.red-80-38-46.pooles.rima-tde.net (80.38.46.183)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 1052425906 19312655 80.38.46.183 (16 [88913])
X-Orig-Path: gurb.mine.nu
User-Agent: slrn/0.9.7.4 (Linux)