Hello,
It will be like one month since I got my wiz, and time to do something with it ... One year earlier I made a DS game: perfect test for the wiz ... Rewrote the code so that it worked on linux, and when enough options got implemented, tried to compile for the wiz. But I more or less get the same negative results as what is described in this post.
The facts:
- Got torpor toolchain+libs
- Untared to / => arm-openwiz-linux-gnu directory created ... as it was told to have toolchain ... mv to toolchain
- ln -s /toolchain /opt/openwiz/toolchain
- made a basic Makefile ... doing basically what fells done
- Launched termula:
-> libiconv.so.2 not found ... Put it beside my app, but no good, then in /lib: OK
-> idem for SDL_image and SDL_gfx ... OK
- Finally, my app launches but it segs fault. As I had some printf .. I saw that the seg fault is occuring at screen initialization. SDL has been correctly initialized.
My Makefile :
WTC=/opt/openwiz/toolchain
GCC=$(WTC)/bin/arm-openwiz-linux-gnu-gcc
Winc=-I. -I$(WTC)/include -I$(WTC)/include/SDL
WCCF=-DGP2X -DIS_LITTLE_ENDIAN -D_REENTRANT -DGP2X_ASM
WLDF=-Wl,-rpath,$(WTC)/lib
wiz: sdlmammoth.c
$(GCC) sdlmammoth.c -o sm.gpe $(Winc) $(WLDF) -L$(WTC)/lib -liconv -lSDL -lSDLmain -lSDL_image -lSDL_gfx $(WCCF) $(CFLAGS)
Now some remark,
First, torpor told that It may be a mix between libs problem ... but in fact the two version of fells compilation process use the same path to lib ... did I miss something ?
In my case, I progressively used informations from this thread (DGP2X flag etc...), but with no luck.
Second, the given Makefile is incomplete ... don't there miss some important informations, fells ?
To be sure, I tried to compile the fells' example, with its Makefile (slightly modified so that it worked). For the record, here it is:
# A basic Makefile to compile for Gp2x/SDL
OPEN2X = /opt/openwiz/toolchain
CC = $(OPEN2X)/bin/arm-openwiz-linux-gnu-gcc
LD = $(CC)
STRIP = $(OPEN2X)/bin/arm-openwiz-linux-gnu-strip
NAME=test
TARGET= $(NAME)-sdl.gpe
DEFS = -DGP2X -DIS_LITTLE_ENDIAN -D_REENTRANT -DGP2X_ASM
INCS = -I. -I$(OPEN2X)/include -I$(OPEN2X)/include/SDL
LDFLAGS=$(CFLAGS) -L$(OPEN2X)/lib
LIBS = -Wl,-rpath,$(OPEN2X)/lib -lSDL -lpng -lm -lz -lpthread
OBJS = main.o
MYCC = $(CC) $(CFLAGS) $(INCS) $(DEFS)
########################################################################
sdl: $(TARGET)
$(TARGET): $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
$(STRIP) $@
.c.o:
$(MYCC) -c $< -o $@
main.o:
$(MYCC) SDLTest.c -c $< -o $@
clean:
rm -f *.o *.gpe
Result: segfault ...
As a final note, it is even harder to compile on an open console than on a cracked one ! :P
Any ideas ? Should I investigate more (which way ?) ? Or maybe should I sit back, relax, and wait for a mature toolchain (Argh don't say that ! :-) )?
eKuReUiL
---
(un geek peut en cacher un autre)
This post has been edited by eKuReUiL: 08 August 2009 - 04:38 PM