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 ^^
Bookmarks