Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: SDL 1.2.9 for the DS

                  
   
  1. #11
    DCEmu Coder GPF's Avatar
    Join Date
    Apr 2004
    Location
    Texas
    Age
    52
    Posts
    796
    Rep Power
    78

    Default

    Quote Originally Posted by Morpheo17
    Hello!!!

    I've got this error when I try to complie libpng from SDL 1.2.9.
    Can u help me with this??

    Code:
    C:\Proyectos\NDS\SDL\libpng-1.2.8>make
    arm-elf-gcc -o pngtest pngtest.o -mthumb -mthumb-interwork -L. -L../zlib-1.2.2 -lpng -lz -lm -s c:\proyectos\nds\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\ar
    m-elf\bin\ld.exe: crt0.o: No such file: No such file or directory
    make: *** [pngtest] Error 1
    I have been able to compile: SDL 1.2.9 and zlib, only xDDD. I am very bad compiling things ^^

    Thanks
    did you change the makefile to match your environment?

    maybe post it here and either i or someone else can make some more suggestions.

    Troy

  2. #12
    DCEmu Newbie
    Join Date
    Apr 2006
    Posts
    2
    Rep Power
    0

    Default

    Truth, the problem was in my Makefile. Now, i change the makefile to match with NDS but give another error XDDD

    My MakeFile:

    Code:
    ZLIBINC = ../zlib-1.2.2
    ZLIBLIB = ../zlib-1.2.2
    
    png$(O): png.h pngconf.h
    pngerror$(O): png.h pngconf.h
    pngget$(O): png.h pngconf.h
    pngmem$(O): png.h pngconf.h
    pngpread$(O): png.h pngconf.h
    pngread$(O): png.h pngconf.h
    pngrio$(O): png.h pngconf.h
    pngrtran$(O): png.h pngconf.h
    pngrutil$(O): png.h pngconf.h
    pngset$(O): png.h pngconf.h
    pngtest$(O): png.h pngconf.h
    pngtrans$(O): png.h pngconf.h
    pngwio$(O): png.h pngconf.h
    pngwrite$(O): png.h pngconf.h
    pngwtran$(O): png.h pngconf.h
    pngwutil$(O): png.h pngconf.h
    
    OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
    	pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
    	pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
    
    SUBDIRS=
    
    
    CC=arm-elf-gcc
    CXX=arm-elf-g++ 
    LDSHARED=$(CXX)
    AR=arm-elf-ar rc
    RANLIB=arm-elf-ranlib 
    
    CFLAGS	=	-mthumb -mthumb-interwork \
    		-mcpu=arm9tdmi -mtune=arm9tdmi \
    		-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
    		-DARM9 -D__NDS__ -I$(DEVKITPRO)/libnds/include -DENABLE_NDS -DDISABLE_THREADS -DPACKAGE=\"SDL\" -DVERSION=\"1.2.9\" -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 \
    		-Iinclude -Isrc -Isrc/audio -Isrc/cdrom -Isrc/endian -Isrc/events -Isrc/joystick -Isrc/thread/nds -Isrc/thread -Isrc/timer -Isrc/video -I$(ZLIBINC) -L$(ZLIBLIB)
    
    
    CXXFLAGS +=$(CFLAGS)
    
    all: $(DEVKITPRO)/libnds/lib/libpng.a
    
    $(DEVKITPRO)/libnds/lib/libpng.a:		$(OBJS)
    	$(AR) $@ $(OBJS)
    	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
    
    
    clean: clean_subdirs
    
    subdirs: $(patsubst %, _dir_%, $(SUBDIRS))
    
    $(patsubst %, _dir_%, $(SUBDIRS)):
    	$(MAKE) -C $(patsubst _dir_%, %, $@)
    
    clean_subdirs: $(patsubst %, _clean_dir_%, $(SUBDIRS))
    
    $(patsubst %, _clean_dir_%, $(SUBDIRS)):
    	$(MAKE) -C $(patsubst _clean_dir_%, %, $@) clean
    
    #include $(DEVKITARM)/ds_rules
    The error:
    Code:
    C:\Proyectos\NDS\SDL\libpng-1.2.8>make
    arm-elf-gcc -mthumb -mthumb-interwork -mcpu=arm9tdmi -mtune=arm9tdmi -O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion -DARM9 -D__NDS__ -I/C/Proyectos/NDS/devkitpro/libnds/include -DENABLE_NDS -DDISABLE_THREADS -DPACKAGE=\"SDL\" -DVERSION=\"1.2.9\" -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -Iinclude -Isrc -Isrc/audio -Isrc/cdrom -Isrc/endian -Isrc/events -Isrc/joystick -Isrc/thread/nds -Isrc/thread -Isrc/timer -Isrc/video -I../zlib-1.2.2 -L../zlib-1.2.2    png.c png.h pngconf.h  -o png
    png.c: In function 'png_free_data':
    png.c:569: warning: negative integer implicitly converted to unsigned type
    pngconf.h:1175: error: syntax error before '*' token
    pngconf.h:1175: warning: type defaults to 'int' in declaration of 'png_zcharp'
    pngconf.h:1175: warning: data definition has no type or storage class
    pngconf.h:1176: error: syntax error before '*' token
    pngconf.h:1176: warning: type defaults to 'int' in declaration of 'png_zcharpp'
    pngconf.h:1176: warning: data definition has no type or storage class
    pngconf.h:1177: error: syntax error before '*' token
    pngconf.h:1177: warning: type defaults to 'int' in declaration of 'png_zstreamp'
    
    pngconf.h:1177: warning: data definition has no type or storage class
    make: *** [png] Error 1
    i hate the makefiles ^^

  3. #13
    DCEmu Coder GPF's Avatar
    Join Date
    Apr 2004
    Location
    Texas
    Age
    52
    Posts
    796
    Rep Power
    78

    Default

    do you have zlib-1.2.2 source code directory above libpng directory?

    ie.
    /prj/zlib-1.2.2
    /prj/libpng-1.2.8

    the file thats throwing the error is missing the declaration of a type, thats defined by zlib i believe, libpng is dependant on zlib.

    Troy

  4. #14
    DCEmu Newbie
    Join Date
    Dec 2009
    Location
    Porto Alegre, RS, Brazil
    Posts
    6
    Rep Power
    0

    Default

    I'm having a similar problem:

    iuri@ubuntu-vm:~/devkitpro/examples/joytestsdl$ make
    testjoystick.c
    arm-eabi-gcc -MMD -MP -MF /home/iuri/devkitpro/examples/joytestsdl/build/testjoystick.d -g -Wall -O2 -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -I/home/iuri/devkitpro/libnds/include -I/home/iuri/devkitpro/libnds/include -I/home/iuri/devkitpro/examples/joytestsdl/build -DARM9 -c /home/iuri/devkitpro/examples/joytestsdl/source/testjoystick.c -o testjoystick.o
    linking joytestSDL.elf
    /home/iuri/devkitpro/libnds/lib/libSDL.a(SDL_ndsvideo.o): In function `NDS_VideoInit':
    SDL_ndsvideo.c.text+0x538): undefined reference to `powerON'
    SDL_ndsvideo.c.text+0x58a): undefined reference to `consoleInitDefault'
    collect2: ld returned 1 exit status
    make[1]: ** [/home/iuri/devkitpro/examples/joytestsdl/joytestSDL.elf] Erro 1
    make: ** [build] Erro 2
    iuri@ubuntu-vm:~/devkitpro/examples/joytestsdl$

  5. #15
    DCEmu Newbie
    Join Date
    Oct 2006
    Posts
    1
    Rep Power
    0

    Default

    I have a problem compilig sdl examples as well.

    C:\devkitPro\examples\nds\sdl\rectSDL>make
    linking rectSDL.elf
    c:/devkitPro/libnds/lib\libSDL.a(SDL_ndsvideo.o): In function `NDS_VideoInit':
    SDL_ndsvideo.c.text+0x62e): undefined reference to `consoleInitDefault'
    collect2: ld returned 1 exit status
    make[1]: *** [/c/devkitPro/examples/nds/sdl/rectSDL/rectSDL.elf] Error 1
    make: *** [build] Error 2
    Would love to get some simple SDL code up and running on the DS.

    Some info: Installed latest devkitpro (devkitARM r27, libnds 1.4.0)
    Downloaded precompiled SDL from here:
    http://gpf.dcemu.co.uk/ndsSDL.shtml

    Put header files in C:\devkitpro\libnds\include\
    and libsdl.a in C:\devkitpro\libnds\lib\

    Didn't know where to put template folder, so didn't extract that one.

    Downloaded the examples and tried to 'make' one.

  6. #16
    DCEmu Newbie
    Join Date
    Apr 2010
    Posts
    1
    Rep Power
    0

    Default Please Help!!!!

    I can't understand why SDL does not work.
    I use Windows 7 , i installed devkitpro , downloaded SDL libs and headers for Nintendo ds put in the right directories in the hard disk but when i type make on the terminal i get this error.

    C:\nds\fireSDL>make
    linking fireSDL.elf
    c:/devkitPro/libnds/lib\libSDL.a<SDL_ndsvide.o>: In function 'NDS_VideoInit':
    SDL_ndsvideo.c.text+0x60e):undefined reference to 'vramSetBankH'
    SDL_ndsvideo.c.text+0x614):undefined reference to 'vramSetBankI'
    SDL_ndsvideo.c.text+0x62e):undefined reference to 'consoleInitDefault'
    collect2: ld returned 1 exit sttus
    make[1]: *** [/g/nds/fireSDL/fireSDL.elf] Error 1
    make: *** [build] Error 2


    Please help!
    Last edited by ventis; April 23rd, 2010 at 23:23.

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •