Article View: es.comp.os.linux.programacion
Article #9240[SDL] No consigo compilar un ejemplo!!!
From: papez
Date: Sat, 17 Aug 2002 22:39
Date: Sat, 17 Aug 2002 22:39
33 lines
1784 bytes
1784 bytes
Tengo las bibliotecas de SDL en /usr/include/SDL (RH7.3)
Y cuando quiero compilar hago:
# gcc sdlp.c -o sdlp -I/usr/include/SDL
pero me da errores:
/tmp/cc2tfCrA.o: In function `main':
/tmp/cc2tfCrA.o(.text+0xc): undefined reference to `SDL_Init'
/tmp/cc2tfCrA.o(.text+0x20): undefined reference to `SDL_GetError'
/tmp/cc2tfCrA.o(.text+0x4c): undefined reference to `SDL_Quit'
collect2: ld returned 1 exit status
Este es el programita:
#include <stdlib.h>
#include <stdio.h>
#include "SDL.h"
int main(int argc, char *argv[])
{
if (SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 )
{
fprintf(stderr, "No se puede iniciar SDL: %s\n", SDL_GetError());
exit(1);
}
atexit(SDL_Quit);
return 0;
}
PD: Tengo instalado el paquete RH7.3 - SDL-devel-1.2.3-7.i386.rpm
pero no creo que sea por no estar actualizado, no?
Me falta quiz�s alguna variable de la shell? (no he puesto ninguna especial)
Technical Details
Message-ID:
<4bce1b6e.0208171439.27f1f235@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f86c8,14e9364318cdfe01,start X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2002-08-17 15:39:53 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mail From: papez@lycos.es (papez) Newsgroups: es.comp.os.linux.programacion Subject: [SDL] No consigo compilar un ejemplo!!! Date: 17 Aug 2002 15:39:52 -0700 Organization: http://groups.google.com/ Lines: 33 Message-ID: <4bce1b6e.0208171439.27f1f235@posting.google.com> NNTP-Posting-Host: 217.127.151.133 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1029623993 22888 127.0.0.1 (17 Aug 2002 22:39:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 17 Aug 2002 22:39:53 GMT