SDL with MinGW32

i have installed mingw32, working perfectly, but i can?t install SDL properly…
i download SDL-devel-1.2.5a-mingw32.tar.gz and descompress i386-mingw32msvc.tar.gz where i have mingw32… but when i want to compile something like

#include "SDL.h"
int main( int argc, char* argv[] )
{
return 0;
}

with makefile

CXX=gcc
OPCIONES=-g -Wall sdl-config --cflags
DIRECTORIOS=
BIBLIOTECAS= sdl-config --libs

all:
${CXX} -o test.exe test.c ${OPCIONES} ${BIBLIOTECAS}

gcc -o test.exe test.c -g -Wall sdl-config --cflags sdl-config --libs
cc1.exe: unrecognized option -fcflags'
cc1.exe: unrecognized option -flibs'
gcc: sdl-config: No such file or directory gcc:sdl-config: No such file or directory
C:\MinGW\make.exe: *** [all] Error 1

when i try to compile with makefile:

CXX=gcc
OPCIONES=-g -Wall -I/include/SDL
DIRECTORIOS=
BIBLIOTECAS= -L/lib -llibSDL -llibSDLmain

all:
${CXX} -o test.exe test.c ${OPCIONES} ${BIBLIOTECAS}

gcc -o test.exe test.c -g -Wall -I/include/SDL -L/lib -llibSDL -llibSDLmain
test.c:1:17: SDL.h: No such file or directory
C:\MinGW\make.exe: *** [all] Error 1

what should i do?

---------------------->
Federico Berardi
http://www.ataquecacerola.com.ar/
---------------------------------------------------------->

Hi,

When you type sdl-config --cflags, the shell (sh, bash, …) must execute
the command enclosed, then print what is returned by the command. For
instance, on my setup (with cygwin):
echo sdl-config --cflags
prints:
-I/usr/local/include/SDL -Dmain=SDL_main -I/usr/include/mingw -DWIN32 -Uunix
-mno-cygwin
It seems that you don’t have a shell interpreter on your setup, since the
backquoted command is not interpreted but simply printed, that leads to the
unrecognized option.

Solution 1: install MSYS, a Unix like environnement suited to work with
mingw32, in order to get a working shell interpreter.

Solution 2: look in the file sdl-config, and replace yourself the backquoted
commands in your makefile with the good options in plain text.

Best Regards,
^IoDream^> ----- Original Message -----

From: Federico Berardi
To: sdl at libsdl.org
Sent: Friday, April 04, 2003 1:59 AM
Subject: [SDL] SDL with MinGW32

i have installed mingw32, working perfectly, but i can?t install SDL
properly…
i download SDL-devel-1.2.5a-mingw32.tar.gz and descompress
i386-mingw32msvc.tar.gz where i have mingw32… but when i want to compile
something like

#include "SDL.h"
int main( int argc, char* argv[] )
{
return 0;
}

with makefile

CXX=gcc
OPCIONES=-g -Wall sdl-config --cflags
DIRECTORIOS=
BIBLIOTECAS= sdl-config --libs

all:
${CXX} -o test.exe test.c ${OPCIONES} ${BIBLIOTECAS}

gcc -o test.exe test.c -g -Wall sdl-config --cflags sdl-config --libs
cc1.exe: unrecognized option -fcflags'
cc1.exe: unrecognized option -flibs'
gcc: sdl-config: No such file or directory gcc:sdl-config: No such file or directory
C:\MinGW\make.exe: *** [all] Error 1

when i try to compile with makefile:

CXX=gcc
OPCIONES=-g -Wall -I/include/SDL
DIRECTORIOS=
BIBLIOTECAS= -L/lib -llibSDL -llibSDLmain

all:
${CXX} -o test.exe test.c ${OPCIONES} ${BIBLIOTECAS}

gcc -o test.exe
est.c -g -Wall -I/include/SDL -L/lib -llibSDL -llibSDLmain
test.c:1:17: SDL.h: No such file or directory
C:\MinGW\make.exe: *** [all] Error 1

what should i do?

---------------------->
Federico Berardi
http://www.ataquecacerola.com.ar/
---------------------------------------------------------->


Envie de discuter en “live” avec vos amis ? T?l?charger MSN Messenger
http://www.ifrance.com/_reloc/m la 1?re messagerie instantan?e de France