Hi All,
I'd like to port some SDL apps and develop directly on the Zaurus, but I'm stuck
at a critical step here. Any pointers you can give me would be appreciated.
I'm an experienced C coder, but not so experienced with SDL, or development on the Z.
I'm trying to get an SDL program I wrote working on the Z (I have a C860) via
onboard development - Not using a cross compiler, but building using zgcc 2.95-2
on the stock Sharp ROM.
The program compiles and runs just fine on a PC, but dies on the Zaurus with the infamous:
--
QPaintDevice: Must construct a QApplication before a QPaintDevice
Aborted
--
I've read that this error is often due to a missing link to libSDLmain.a, but I'm linking to
it already!
I built my own SDL using the CVS version of the zports SDL.
Since the checked out zports version was missing some files,
I merged it with a vanilla copy of SDL 1.2.8 - hopefully that isn't
causing some funkiness (I assume it isn't since my compiled version
of SDL doesn't seem to crash my existing SDL programs).
Here are the build options I used to compile SDL onboard:
#!/bin/bash
OPTIMIZE=" -O3 -fexpensive-optimizations -funroll-loops -fomit-frame-pointer "
export CFLAGS="$OPTIMIZE -DZAURUS_SL=1"
./configure --enable-video-qtopia --disable-video-dummy --disable-video-fbcon -
-disable-video-dga --disable-arts --disable-esd --disable-alsa --disable-video-x
11 --disable-nasm --prefix=/opt/QtPalmtop
Here's the relevant part of the Makefile for my program:
--
CFLAGS=-Wall -g ${SDLINC}
SDLLIB=-lqte -lqpe -lSDLmain -lSDL -L/mnt/cf/.zgcc/lib -lm -lc /lib/libpthread.so.0
#note: funky link to pthread above is due to missing symlink in /lib
SDLINC=-D_REENTRANT -I/mnt/cf/.include/Qtopia
CC=$(GCCPREFIX)gcc ${CFLAGS}
foo: foo.o ${OBJ}
${CC} ${CFLAGS} foo.o ${OBJ} -o foo ${SDLLIB}
--
Any help would be greatly appreciated - I hope I'm just missing something
obvious (Wouldn't be the first time) ;-)
Thanks,
Ford