Hi,
I'm trying to compile the and simple SDL demo with open2x. I had some problems to start with but now it works when I compile it like this:
open2x-gcc -c -Wall -I/usr/local/open2x/include -I/usr/local/open2x/include/SDL -D_REENTRANT demo.c -o demo.o
open2x-gcc demo.o -o helloworld.gpe -msoft-float-L/usr/local/open2x/lib -Wl,-rpath,/usr/local/open2x/lib -lSDL -lpthread -lm -ldl
I actually use `/usr/local/open2x/bin/sdl-config --cflags` and `/usr/local/open2x/bin/sdl-config --static-libs` for compiling but I thought the expanded version would be more instructive.
If I add a float to the source then at runtime I get the following:
./helloworld.gpe: relocation error: ./helloworld.gpe: undefined symbol: __extendsfdf2
If I compile it with the static flag I don't get the have any problem with floats but instead of the image the program is supposed to display I get some unpleasant black and white bands on the screen. The app responds to events as expected and when I quit the app I see a flash of the image it should be displaying just before it exits to the menu.
Any ideas how to solve or investigate this?
Cheers,
Charlie
I'm trying to compile the and simple SDL demo with open2x. I had some problems to start with but now it works when I compile it like this:
open2x-gcc -c -Wall -I/usr/local/open2x/include -I/usr/local/open2x/include/SDL -D_REENTRANT demo.c -o demo.o
open2x-gcc demo.o -o helloworld.gpe -msoft-float-L/usr/local/open2x/lib -Wl,-rpath,/usr/local/open2x/lib -lSDL -lpthread -lm -ldl
I actually use `/usr/local/open2x/bin/sdl-config --cflags` and `/usr/local/open2x/bin/sdl-config --static-libs` for compiling but I thought the expanded version would be more instructive.
If I add a float to the source then at runtime I get the following:
./helloworld.gpe: relocation error: ./helloworld.gpe: undefined symbol: __extendsfdf2
If I compile it with the static flag I don't get the have any problem with floats but instead of the image the program is supposed to display I get some unpleasant black and white bands on the screen. The app responds to events as expected and when I quit the app I see a flash of the image it should be displaying just before it exits to the menu.
Any ideas how to solve or investigate this?
Cheers,
Charlie