[SOLVED]Problem building with SDL

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

Moderators: cheriff, TyRaNiD

Post Reply
angus
Posts: 3
Joined: Mon Jan 04, 2010 2:41 am
Contact:

[SOLVED]Problem building with SDL

Post by angus »

Hi,

I'm working on porting bochs, but I'm running across a problem when it comes to building with SDL. My error is as follows

Error

Code: Select all

/bin/sh ./libtool --mode=link psp-g++ -o bochs -g -Wall -G0 -O2  -I/usr/local/pspdev/psp/sdk/include -D_PSP_FW_VERSION=371    -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx -L/usr/local/pspdev/psp/sdk/lib  -export-dynamic logio.o main.o config.o load32bitOShack.o pc_system.o osdep.o plugin.o crc.o  \
		iodev/libiodev.a  cpu/libcpu.a memory/libmemory.a gui/libgui.a \
		disasm/libdisasm.a   \
		fpu/libfpu.a \
		`/usr/local/pspdev/psp/bin/sdl-config --cflags --libs` \
		-lc -lpspuser -lm -lSDLmain -lSDL -lc -lg -lGL -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspvfpu -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspnet_resolver  
psp-g++ -o bochs -g -Wall -G0 -O2 -I/usr/local/pspdev/psp/sdk/include -D_PSP_FW_VERSION=371 -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q -Wl,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx logio.o main.o config.o load32bitOShack.o pc_system.o osdep.o plugin.o crc.o -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -Wl,--export-dynamic  -L/usr/local/pspdev/psp/sdk/lib iodev/libiodev.a cpu/libcpu.a memory/libmemory.a gui/libgui.a disasm/libdisasm.a fpu/libfpu.a -L/usr/local/pspdev/psp/lib -lSDLmain /usr/local/pspdev/psp/lib/libSDL.a /usr/local/pspdev/psp/lib/libstdc++.a -lm -lg -lGL -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspvfpu -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspnet_resolver
/usr/local/pspdev/psp/lib/libSDLmain.a(SDL_psp_main.o): In function `main':
psp/SDL_psp_main.c:76: undefined reference to `SDL_main'
collect2: ld returned 1 exit status
make: *** [bochs] Error 1
I have an SDL_main in my source (I've tried main and SDL_main, both with extern "C" but neither fixed the problem). I also include SDL.h

I believe it may be a problem with my makefile (seen below). I've had a look and tried many things to rectify the problem but nothing I have tried seems to have worked.

Any help at all will be appreciated.

Makefile

Code: Select all

prefix          = /usr/local/pspdev/psp
exec_prefix     = ${prefix}
srcdir          = .

#PSP stuff to compile it
TARGET = bochs
BUILD_PRX=1
PSP_FW_VERSION=371
PSP_LARGE_MEMORY=1

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Bochs

PSPSDK=$(shell psp-config --pspsdk-path)
PSPBIN = $(PSPSDK)/../bin 

bindir          = ${exec_prefix}/bin
libdir          = ${exec_prefix}/lib
plugdir         = ${exec_prefix}/lib/bochs/plugins
datarootdir     = ${prefix}/share
mandir          = ${datarootdir}/man
man1dir         = $(mandir)/man1
man5dir         = $(mandir)/man5
docdir          = $(datarootdir)/doc/bochs
sharedir        = $(datarootdir)/bochs
top_builddir    = .
top_srcdir      = $(srcdir)

DESTDIR =/home/angus

VERSION=2.4.2
VER_STRING=2.4.2-PSP
REL_STRING=Build from CVS snapshot on November 12, 2009
MAN_PAGE_1_LIST=bochs bximage bxcommit bochs-dlx
MAN_PAGE_5_LIST=bochsrc
INSTALL_LIST_SHARE=bios/BIOS-bochs-* bios/VGABIOS* 
INSTALL_LIST_BIN=bochs
INSTALL_LIST_BIN_OPTIONAL=bochsdbg
CP=cp
CAT=cat
RM=rm
MV=mv
LN_S=ln -sf
#DLXLINUX_TAR=dlxlinux4.tar.gz
#DLXLINUX_TAR_URL=http://bochs.sourceforge.net/guestos/$(DLXLINUX_TAR)
#DLXLINUX_ROMFILE=BIOS-bochs-latest
GUNZIP=gunzip
WGET=wget
SED=sed
MKDIR=mkdir
RMDIR=rmdir
TAR=tar
CHMOD=chmod
GZIP_BIN=gzip -9
GUNZIP=gunzip
ZIP=zip
UNIX2DOS=unix2dos
LIBTOOL=$(SHELL) $(top_builddir)/libtool
DLLTOOL=dlltool
RC_CMD=
.SUFFIXES: .cc

srcdir = .

SHELL = /bin/sh

CC = psp-gcc
CXX = psp-g++
AS       = psp-gcc
LD       = psp-gcc
AR       = psp-ar
RANLIB   = psp-ranlib
STRIP    = psp-strip
MKSFO    = mksfo
PACK_PBP = pack-pbp
FIXUP    = psp-fixup-imports
PSPSDK_LIBC_LIB = -lc
INCDIR   =$(PSPSDK)/include

CFLAGS = -g -Wall -G0 -O2 -I$(INCDIR)
CXXFLAGS = -g -Wall -G0 -O2  -I$(INCDIR)

#Check for slim memory flag
ifeq ($(PSP_LARGE_MEMORY),1)
MKSFO = mksfoex -d MEMSIZE=1
endif

#Set firmware version(apparantly?)
CFLAGS += -D_PSP_FW_VERSION=$(PSP_FW_VERSION) $(SHELL $(PSPBIN)/sdl-config --cflags) 
CXXFLAGS += -D_PSP_FW_VERSION=$(PSP_FW_VERSION) $(SHELL $(PSPBIN)/sdl-config --cflags) 

#must be above the prx check
LDFLAGS = -L/usr/local/pspdev/psp/sdk/lib 

#Check if we want PRX (yarp)
ifeq ($(BUILD_PRX),1)
LDFLAGS  := $(addprefix -L,$(LIBDIR)) -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx $(LDFLAGS)
EXTRA_CLEAN += $(TARGET).elf
# Setup default exports if needed
ifdef PRX_EXPORTS
EXPORT_OBJ=$(patsubst %.exp,%.o,$(PRX_EXPORTS))
EXTRA_CLEAN += $(EXPORT_OBJ)
else 
EXPORT_OBJ=$(PSPSDK)/lib/prxexports.o
endif
else
LDFLAGS  := $(addprefix -L,$(LIBDIR)) $(LDFLAGS)
endif

LIBS = -lc -lpspuser -lm -lSDLmain -lSDL -lc -lg -lGL -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspvfpu -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspnet_resolver $(SHELL $(PSPBIN)/sdl-config --libs) 

GUI_LINK_OPTS_SDL = `/usr/local/pspdev/psp/bin/sdl-config --cflags --libs`

GUI_LINK_OPTS =  $(GUI_LINK_OPTS_SDL)

#Start eboot flags
PSP_EBOOT_TITLE = $(TARGET)
PSP_EBOOT_SFO = PARAM.SFO

PSP_EBOOT = EBOOT.PBP

#more snazzy prx stuff
ifeq ($(BUILD_PRX),1)
ifneq ($(TARGET_LIB),)
$(error TARGET_LIB should not be defined when building a prx)
else
FINAL_TARGET = $(TARGET).prx
endif
else
ifneq ($(TARGET_LIB),)
FINAL_TARGET = $(TARGET_LIB)
else
FINAL_TARGET = $(TARGET).elf
endif
endif
#end eboot flags

CFLAGS_CONSOLE = -g -G0 -O2 $(MCH_CFLAGS) $(FLA_FLAGS) -test
CXXFLAGS_CONSOLE = -g -G0 -O2 $(MCH_CFLAGS) $(FLA_FLAGS) -test
BXIMAGE_LINK_OPTS =
BX_INCDIRS = -I. -I$(srcdir)/. -Iinstrument/stubs -I$(srcdir)/instrument/stubs -I,$(INCDIR)

NONINLINE_OBJS = \
	logio.o \
	main.o \
	config.o \
	load32bitOShack.o \
	pc_system.o \
	osdep.o \
	plugin.o \
	crc.o

EXTERN_ENVIRONMENT_OBJS = \
	main.o \
	config.o \
	load32bitOShack.o \
	pc_system.o

DEBUGGER_LIB   = bx_debug/libdebug.a
DISASM_LIB     = disasm/libdisasm.a
INSTRUMENT_LIB = instrument/stubs/libinstrument.a
FPU_LIB        = fpu/libfpu.a
READLINE_LIB   = 
EXTRA_LINK_OPTS = 

GDBSTUB_OBJS = gdbstub.o

BX_OBJS = $(NONINLINE_OBJS)

BX_INCLUDES = bochs.h config.h osdep.h

.cc.o:
	$&#40;CXX&#41; -c $&#40;BX_INCDIRS&#41; $&#40;CXXFLAGS&#41; $< -o $@
.c.o&#58;
	$&#40;CC&#41; -c $&#40;BX_INCDIRS&#41; $&#40;CFLAGS&#41; $&#40;FPU_FLAGS&#41; $< -o $@

all&#58; bochs
 
bochs&#58; iodev/libiodev.a  \
           cpu/libcpu.a memory/libmemory.a gui/libgui.a \
	$&#40;DISASM_LIB&#41; $&#40;BX_OBJS&#41; \
        $&#40;SIMX86_OBJS&#41; $&#40;FPU_LIB&#41; 
	$&#40;LIBTOOL&#41; --mode=link $&#40;CXX&#41; -o $@ $&#40;CXXFLAGS&#41; $&#40;LDFLAGS&#41; -export-dynamic $&#40;BX_OBJS&#41; $&#40;SIMX86_OBJS&#41; \
		iodev/libiodev.a  cpu/libcpu.a memory/libmemory.a gui/libgui.a \
		$&#40;DISASM_LIB&#41;   \
		$&#40;FPU_LIB&#41; \
		$&#40;GUI_LINK_OPTS&#41; \
		$&#40;MCH_LINK_FLAGS&#41; \
		$&#40;SIMX86_LINK_FLAGS&#41; \
		$&#40;READLINE_LIB&#41; \
		$&#40;EXTRA_LINK_OPTS&#41; \
		$&#40;LIBS&#41;
		
bochs_plugins&#58;
	cd gui && \
	$&#40;MAKE&#41; plugins
	echo done
	cd iodev && \
	$&#40;MAKE&#41; plugins
	echo done

bxcommit&#58; misc/bxcommit.o
	$&#40;LIBTOOL&#41; --mode=link $&#40;CXX&#41; -o $@ $&#40;CXXFLAGS_CONSOLE&#41; $&#40;LDFLAGS&#41; misc/bxcommit.o

niclist&#58; misc/niclist.o
	$&#40;LIBTOOL&#41; --mode=link $&#40;CXX&#41; -o $@ $&#40;CXXFLAGS_CONSOLE&#41; $&#40;LDFLAGS&#41; misc/niclist.o

misc/bxcommit.o&#58; $&#40;srcdir&#41;/misc/bxcommit.c $&#40;srcdir&#41;/iodev/hdimage.h
	$&#40;CC&#41; -c $&#40;BX_INCDIRS&#41; $&#40;CFLAGS_CONSOLE&#41; $&#40;srcdir&#41;/misc/bxcommit.c -o $@

misc/niclist.o&#58; $&#40;srcdir&#41;/misc/niclist.c
	$&#40;CC&#41; -c $&#40;BX_INCDIRS&#41; $&#40;CFLAGS_CONSOLE&#41; $&#40;srcdir&#41;/misc/niclist.c -o $@

$&#40;BX_OBJS&#41;&#58; $&#40;BX_INCLUDES&#41;

# cannot use -C option to be compatible with Microsoft nmake
iodev/libiodev.a&#58;&#58;
	cd iodev && \
	$&#40;MAKE&#41; $&#40;MDEFINES&#41; libiodev.a
	echo done

bx_debug/libdebug.a&#58;&#58;
	cd bx_debug && \
	$&#40;MAKE&#41; $&#40;MDEFINES&#41; libdebug.a
	echo done

cpu/libcpu.a&#58;&#58;
	cd cpu && \
	$&#40;MAKE&#41; $&#40;MDEFINES&#41; libcpu.a
	echo done

memory/libmemory.a&#58;&#58;
	cd memory && \
	$&#40;MAKE&#41; $&#40;MDEFINES&#41; libmemory.a
	echo done

gui/libgui.a&#58;&#58;
	cd gui && \
	$&#40;MAKE&#41; $&#40;MDEFINES&#41; libgui.a
	echo done

disasm/libdisasm.a&#58;&#58;
	cd disasm && \
	$&#40;MAKE&#41; $&#40;MDEFINES&#41; libdisasm.a
	echo done

instrument/stubs/libinstrument.a&#58;&#58;
	cd instrument/stubs && \
	$&#40;MAKE&#41; $&#40;MDEFINES&#41; libinstrument.a
	echo done

fpu/libfpu.a&#58;&#58;
	cd fpu && \
	$&#40;MAKE&#41; $&#40;MDEFINES&#41; libfpu.a
	echo done

libbochs.a&#58;
	-rm -f libbochs.a
	ar rv libbochs.a $&#40;EXTERN_ENVIRONMENT_OBJS&#41;
	$&#40;RANLIB&#41; libbochs.a

libbochs_cpu.a&#58;  $&#40;BX_OBJS&#41;
	-rm -f libbochs_cpu.a
	ar rv libbochs_cpu.a $&#40;BX_OBJS&#41;
	$&#40;RANLIB&#41; libbochs_cpu.a

tar&#58;
	NAME=`pwd|$&#40;SED&#41; 's/.*\///'`; &#40;cd ..; $&#40;RM&#41; -f $$NAME.zip; tar cf - $$NAME | $&#40;GZIP_BIN&#41; > $$NAME.tar.gz&#41;; ls -l ../$$NAME.tar.gz

zip&#58;
	NAME=`pwd|$&#40;SED&#41; 's/.*\///'`; &#40;cd ..; $&#40;RM&#41; -f $$NAME-msvc-src.zip; $&#40;ZIP&#41; $$NAME-msvc-src.zip -r $$NAME -x \*CVS\* -x \*.cvsignore &#41;; ls -l ../$$NAME-msvc-src.zip

clean&#58;
	rm -f  *.o
	rm -f  *.a
	rm -f  bochs
	rm -f  bochs.exe
	rm -f  bximage
	rm -f  bximage.exe
	rm -f  bxcommit
	rm -f  bxcommit.exe
	rm -f  niclist
	rm -f  niclist.exe
	rm -f  bochs.out
	rm -f  bochsout.txt
	rm -f  bochs.exp
	rm -f  bochs.def
	rm -f  bochs.scpt
	rm -f  -rf bochs.app
	rm -f  -rf .libs
	rm -f  .win32_dll_plugin_target

all-clean&#58; clean
	cd iodev && \
	$&#40;MAKE&#41; clean
	echo done
	cd bx_debug && \
	$&#40;MAKE&#41; clean
	echo done
	cd cpu && \
	$&#40;MAKE&#41; clean
	echo done
	cd memory && \
	$&#40;MAKE&#41; clean
	echo done
	cd gui && \
	$&#40;MAKE&#41; clean
	echo done
	cd disasm && \
	$&#40;MAKE&#41; clean
	echo done
	cd instrument/stubs && \
	$&#40;MAKE&#41; clean
	echo done
	cd misc && \
	$&#40;MAKE&#41; clean
	echo done
	cd fpu && \
	$&#40;MAKE&#41; clean
	echo done
	cd doc/docbook && \
	$&#40;MAKE&#41; clean
	echo done
	cd host/linux/pcidev && \
	$&#40;MAKE&#41; clean
	echo done

###########################################
# dependencies generated by
#  gcc -MM -I. -Iinstrument/stubs *.cc | sed -e 's/\.cc/.cc/g' -e 's,cpu/,cpu/,g'
###########################################
config.o&#58; config.cc bochs.h config.h osdep.h bx_debug/debug.h config.h \
  osdep.h bxversion.h gui/siminterface.h memory/memory.h pc_system.h \
  plugin.h extplugin.h ltdl.h gui/gui.h instrument/stubs/instrument.h \
  iodev/iodev.h bochs.h iodev/vga.h
crc.o&#58; crc.cc config.h
gdbstub.o&#58; gdbstub.cc bochs.h config.h osdep.h bx_debug/debug.h config.h \
  osdep.h bxversion.h gui/siminterface.h memory/memory.h pc_system.h \
  plugin.h extplugin.h ltdl.h gui/gui.h instrument/stubs/instrument.h \
  cpu/cpu.h cpu/crregs.h cpu/descriptor.h cpu/instr.h cpu/lazy_flags.h \
  cpu/icache.h cpu/apic.h cpu/i387.h fpu/softfloat.h fpu/tag_w.h \
  fpu/status_w.h fpu/control_w.h cpu/xmm.h cpu/stack.h iodev/iodev.h \
  bochs.h iodev/vga.h
load32bitOShack.o&#58; load32bitOShack.cc bochs.h config.h osdep.h \
  bx_debug/debug.h config.h osdep.h bxversion.h gui/siminterface.h \
  memory/memory.h pc_system.h plugin.h extplugin.h ltdl.h gui/gui.h \
  instrument/stubs/instrument.h cpu/cpu.h cpu/crregs.h cpu/descriptor.h \
  cpu/instr.h cpu/lazy_flags.h cpu/icache.h cpu/apic.h cpu/i387.h \
  fpu/softfloat.h fpu/tag_w.h fpu/status_w.h fpu/control_w.h cpu/xmm.h \
  iodev/iodev.h bochs.h iodev/vga.h
logio.o&#58; logio.cc bochs.h config.h osdep.h bx_debug/debug.h config.h \
  osdep.h bxversion.h gui/siminterface.h memory/memory.h pc_system.h \
  plugin.h extplugin.h ltdl.h gui/gui.h instrument/stubs/instrument.h \
  cpu/cpu.h cpu/crregs.h cpu/descriptor.h cpu/instr.h cpu/lazy_flags.h \
  cpu/icache.h cpu/apic.h cpu/i387.h fpu/softfloat.h fpu/tag_w.h \
  fpu/status_w.h fpu/control_w.h cpu/xmm.h iodev/iodev.h bochs.h \
  iodev/vga.h
main.o&#58; main.cc bochs.h config.h osdep.h bx_debug/debug.h config.h \
  osdep.h bxversion.h gui/siminterface.h memory/memory.h pc_system.h \
  plugin.h extplugin.h ltdl.h gui/gui.h instrument/stubs/instrument.h \
  gui/textconfig.h cpu/cpu.h cpu/crregs.h cpu/descriptor.h cpu/instr.h \
  cpu/lazy_flags.h cpu/icache.h cpu/apic.h cpu/i387.h fpu/softfloat.h \
  fpu/tag_w.h fpu/status_w.h fpu/control_w.h cpu/xmm.h iodev/iodev.h \
  bochs.h iodev/vga.h
osdep.o&#58; osdep.cc bochs.h config.h osdep.h bx_debug/debug.h config.h \
  osdep.h bxversion.h gui/siminterface.h memory/memory.h pc_system.h \
  plugin.h extplugin.h ltdl.h gui/gui.h instrument/stubs/instrument.h
pc_system.o&#58; pc_system.cc bochs.h config.h osdep.h bx_debug/debug.h \
  config.h osdep.h bxversion.h gui/siminterface.h memory/memory.h \
  pc_system.h plugin.h extplugin.h ltdl.h gui/gui.h \
  instrument/stubs/instrument.h cpu/cpu.h cpu/crregs.h cpu/descriptor.h \
  cpu/instr.h cpu/lazy_flags.h cpu/icache.h cpu/apic.h cpu/i387.h \
  fpu/softfloat.h fpu/tag_w.h fpu/status_w.h fpu/control_w.h cpu/xmm.h \
  iodev/iodev.h bochs.h iodev/vga.h
plex86-interface.o&#58; plex86-interface.cc bochs.h config.h osdep.h \
  bx_debug/debug.h config.h osdep.h bxversion.h gui/siminterface.h \
  memory/memory.h pc_system.h plugin.h extplugin.h ltdl.h gui/gui.h \
  instrument/stubs/instrument.h plex86-interface.h plex86/plex86.h \
  plex86/descriptor.h
plugin.o&#58; plugin.cc bochs.h config.h osdep.h bx_debug/debug.h config.h \
  osdep.h bxversion.h gui/siminterface.h memory/memory.h pc_system.h \
  plugin.h extplugin.h ltdl.h gui/gui.h instrument/stubs/instrument.h \
  iodev/iodev.h bochs.h iodev/vga.h
#psp stuff
kxploit&#58; $&#40;TARGET&#41;.elf $&#40;PSP_EBOOT_SFO&#41;
	mkdir -p "$&#40;TARGET&#41;"
	$&#40;STRIP&#41; $&#40;TARGET&#41;.elf -o $&#40;TARGET&#41;/$&#40;PSP_EBOOT&#41;
	mkdir -p "$&#40;TARGET&#41;%"
	$&#40;PACK_PBP&#41; "$&#40;TARGET&#41;%/$&#40;PSP_EBOOT&#41;" $&#40;PSP_EBOOT_SFO&#41; $&#40;PSP_EBOOT_ICON&#41;  \
		$&#40;PSP_EBOOT_ICON1&#41; $&#40;PSP_EBOOT_UNKPNG&#41; $&#40;PSP_EBOOT_PIC1&#41;  \
		$&#40;PSP_EBOOT_SND0&#41; NULL $&#40;PSP_EBOOT_PSAR&#41;

SCEkxploit&#58; $&#40;TARGET&#41;.elf $&#40;PSP_EBOOT_SFO&#41;
	mkdir -p "__SCE__$&#40;TARGET&#41;"
	$&#40;STRIP&#41; $&#40;TARGET&#41;.elf -o __SCE__$&#40;TARGET&#41;/$&#40;PSP_EBOOT&#41;
	mkdir -p "%__SCE__$&#40;TARGET&#41;"
	$&#40;PACK_PBP&#41; "%__SCE__$&#40;TARGET&#41;/$&#40;PSP_EBOOT&#41;" $&#40;PSP_EBOOT_SFO&#41; $&#40;PSP_EBOOT_ICON&#41;  \
		$&#40;PSP_EBOOT_ICON1&#41; $&#40;PSP_EBOOT_UNKPNG&#41; $&#40;PSP_EBOOT_PIC1&#41;  \
		$&#40;PSP_EBOOT_SND0&#41; NULL $&#40;PSP_EBOOT_PSAR&#41;

$&#40;TARGET&#41;.elf&#58; $&#40;OBJS&#41; $&#40;EXPORT_OBJ&#41;
	$&#40;LINK.c&#41; $^ $&#40;LIBS&#41; -o $@
	$&#40;FIXUP&#41; $@

$&#40;TARGET_LIB&#41;&#58; $&#40;OBJS&#41;
	$&#40;AR&#41; cru $@ $&#40;OBJS&#41;
	$&#40;RANLIB&#41; $@

$&#40;PSP_EBOOT_SFO&#41;&#58; 
	$&#40;MKSFO&#41; '$&#40;PSP_EBOOT_TITLE&#41;' $@

ifeq &#40;$&#40;BUILD_PRX&#41;,1&#41;
$&#40;PSP_EBOOT&#41;&#58; $&#40;TARGET&#41;.prx $&#40;PSP_EBOOT_SFO&#41;
	$&#40;PACK_PBP&#41; $&#40;PSP_EBOOT&#41; $&#40;PSP_EBOOT_SFO&#41; $&#40;PSP_EBOOT_ICON&#41;  \
		$&#40;PSP_EBOOT_ICON1&#41; $&#40;PSP_EBOOT_UNKPNG&#41; $&#40;PSP_EBOOT_PIC1&#41;  \
		$&#40;PSP_EBOOT_SND0&#41;  $&#40;TARGET&#41;.prx $&#40;PSP_EBOOT_PSAR&#41;
else
$&#40;PSP_EBOOT&#41;&#58; $&#40;TARGET&#41;.elf $&#40;PSP_EBOOT_SFO&#41;
	$&#40;STRIP&#41; $&#40;TARGET&#41;.elf -o $&#40;TARGET&#41;_strip.elf
	$&#40;PACK_PBP&#41; $&#40;PSP_EBOOT&#41; $&#40;PSP_EBOOT_SFO&#41; $&#40;PSP_EBOOT_ICON&#41;  \
		$&#40;PSP_EBOOT_ICON1&#41; $&#40;PSP_EBOOT_UNKPNG&#41; $&#40;PSP_EBOOT_PIC1&#41;  \
		$&#40;PSP_EBOOT_SND0&#41;  $&#40;TARGET&#41;_strip.elf $&#40;PSP_EBOOT_PSAR&#41;
	-rm -f $&#40;TARGET&#41;_strip.elf
endif

%.prx&#58; %.elf
	psp-prxgen $< $@

%.c&#58; %.exp
	psp-build-exports -b $< > $@
##end psp stuff
Last edited by angus on Fri Jan 08, 2010 8:26 am, edited 1 time in total.
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

try changing int main() by int SDL_main()
Be carrefull SDL_main is case sensitive
angus
Posts: 3
Joined: Mon Jan 04, 2010 2:41 am
Contact:

Post by angus »

Thanks, but it wasn't that. I realised that i hadn't actually initialised SDL. Thanks anyway! All works now.

For anyone else interested, i added an initialization statement at the top of my SDL_main()

Code: Select all

if &#40;SDL_Init &#40;SDL_INIT_VIDEO|SDL_INIT_AUDIO|SDL_INIT_JOYSTICK&#41; < 0&#41;

    &#123;
    &#125;
    else
    &#123;
    &#125;
Post Reply