sdl compiling error??

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

sdl compiling error??

Post by dark_zarkon »

Hi!

when i'm tring to compile the sdl test sample taken from here it give me thi error:
cc1: error: invalid option 'no-cygwin'
why?

this is makefile...

Code: Select all

TARGET = sdltest
OBJS = sdltest.o

INCDIR = 
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP kxploit
EXTRA_CLEAN = my-clean

PSP_EBOOT_TITLE = SDL Test v1.1
PSP_DIR_NAME = SDLTEST

PSPSDK=$(shell psp-config --pspsdk-path)
PSPBIN = $(PSPSDK)/../bin
CFLAGS += $(shell $(PSPBIN)/sdl-config --cflags)
LIBS += $(shell $(PSPBIN)/sdl-config --libs)
include $(PSPSDK)/lib/build.mak

# Use "make pc" to build a copy of sdltest that runs on your PC.

pc: gcc -o sdltest-pc sdltest.c `sdl-config --cflags` `sdl-config --libs`

my-clean: rm -rf $(TARGET) $(TARGET)% sdltest-pc
thanks in advance for answer! ;)
i'm italian...
forgive me for my english! :)
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Are you trying to build it for the PC ("make pc") or the PSP ("make")? What is the compiler command line being executed?
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

Post by dark_zarkon »

jimparis wrote:Are you trying to build it for the PC ("make pc") or the PSP ("make")? What is the compiler command line being executed?
"make" and "make kxploit" doesn't work, "make pc" give me a different error:
make: *** no rule to make target 'gcc', needed by 'pc'. stop.
i'm using cygwin and i have installed thi lib with "pspdevlibinstall" downloaded from pspupdate.
i'm italian...
forgive me for my english! :)
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

dark_zarkon wrote:
jimparis wrote:What is the compiler command line being executed?
"make" and "make kxploit" doesn't work
Unless you give us the exact compiler command line, we're not going to be able to help you. Run "make" and cut and paste all of the output here.
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

Post by dark_zarkon »

if i type "make" the error is:
$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/inclu
de/SDL -Dmain=SDL_main -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin -c -o s
dltest.o sdltest.c
cc1: error: invalid option 'no-cygwin'
make: *** [sdltest.o] Error 1
i'm italian...
forgive me for my english! :)
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

-I/usr/local/include/SDL -Dmain=SDL_main -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin
This part is wrong. It looks like it's somehow picking up your system's installation of SDL instead of the PSPs. You did build and install the PSP SDL, right? Can you show us the output of these three commands:

Code: Select all

$ ls -l /usr/local/pspdev/psp/bin/sdl-config
$ /usr/local/pspdev/psp/bin/sdl-config --cflags
$ /usr/local/pspdev/psp/bin/sdl-config --libs
dark_zarkon
Posts: 26
Joined: Wed Jan 11, 2006 9:35 pm

Post by dark_zarkon »

jimparis wrote:
-I/usr/local/include/SDL -Dmain=SDL_main -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin
This part is wrong. It looks like it's somehow picking up your system's installation of SDL instead of the PSPs. You did build and install the PSP SDL, right? Can you show us the output of these three commands:

Code: Select all

$ ls -l /usr/local/pspdev/psp/bin/sdl-config
$ /usr/local/pspdev/psp/bin/sdl-config --cflags
$ /usr/local/pspdev/psp/bin/sdl-config --libs
this is the result:
gianfranco@franco ~
$ ls -l /usr/local/pspdev/psp/bin/sdl-config
-rwxr-xr-x 1 gianfranco Nessuno 1675 Jun 23 09:02 /usr/local/pspdev/psp/bin/sdl-config

gianfranco@franco ~
$ /usr/local/pspdev/psp/bin/sdl-config --cflags
-I/usr/local/include/SDL -Dmain=SDL_main -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin

gianfranco@franco ~
$ /usr/local/pspdev/psp/bin/sdl-config --libs
-L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows -mno-cygwin
i'm italian...
forgive me for my english! :)
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Somehow your PSP build of SDL is messed up -- it looks like it's just a normal Windows build of SDL that somehow got copied to that directory??
Try rebuilding and reinstalling the psp version. Make sure you don't have any CFLAGS or LDFLAGS set when you do it (other than the ones listed in the readme.psp).
Post Reply