OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio


Welcome Guest ( Log In | Register )

> Sdl/zgcc Problem - Please Help
post Apr 17 2005, 09:33 AM
Post #1

Group: Members
Posts: 12
Joined: 2-March 05
Member No.: 6,554

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
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:

OPTIMIZE=" -O3 -fexpensive-optimizations -funroll-loops -fomit-frame-pointer "
./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:
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

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) ;-)


Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 30th September 2016 - 02:14 AM