Floating poing maths is very likely to introduce tiny errors like this. It's just the way it is; rounding errors and other sources of inaccuracy all add up. I know it seems like it should be perfectly accurate on such a simple calculation but that's just not how it works. As an asside, when you...
It is also very likely that optimization has uncovered a pre-existing bug. There will be less margin for error with optimization turned on so any out-if-bounds array accesses are more likely to cause segfaults rather than just returning uninitialized gibberish.
My advice is to try and find where...
Hey, you are welcome, it's taken up far to much of my time so I thought I'd spread the procrastination! The guy who wrote it must be getting big google checks by now.
Enjoy!
Charlie
This is a simple and addictive flash game. I think it would be a good addition to the gp2x game collection. I know there is no source available so I'm asking the open source faries for a clone not a port. It is quite a simple spritey tower defence game so it shouldn't be too hard for someone who...
Maybe this thread will help. Poddy found a combination of commands that statically compiles, with SDL, uses float and doesn't do the whole black and white banding thing.
Enjoy!
Charlie
Your makefile worked! I'm happy. I also moved the -staic flag in my makefile to where it is in yours and it still worked. I didn't need to turn off optimization. This whole arguement order thing is messing with my mind but at least it works now. Here's my makefile for reference...
Poddy,
I actually managed to get half way to solving this. It seems to all depend on the order of the arguments. The compile command that worked for me was
open2x-gcc main.o matrix.o figures.o fixed.o -o bin/wire3d.gpe -lSDL_gfx -msoft-float -lm -lg -lpthread -static...
I'm talking about explicity declared floats. When you divide an int by and int and put the results into an int the compiler will realize that you actually want integer division and no floats will be involved. Both of the examples you give are integer division; actually they are const integer...
Errm well, the command did get the SDL stuff to work statically but the float problem is still around. Maybe more argument re-arranging will solve it. The test program I used doesn't use any floats anymore but I just ran a program that does and I'm back to getting "relocation error: ./boids.gpe...
Ok so in one of my other post on this subject I said that I managed to solve some of my problems by re-arranging the order of the arguments to gcc, specifically moving the -l flags to after the list of .o files. Doing a little more re-arranging of arguments and making sure that SDL_SetVideoMode...
I wish I had a solution that works for all the cases. I have replaced all the floats with longs for fixed point because I was going to do that anyway and that works unless I compile with -static which gives me the black and white bands if it compiles at all. I'm just expressing my sympathetic...
This is *exactly* what happens to me! See my messages: http://www.gp32x.de/board/index.php?showtopic=34626 and http://www.gp32x.de/board/index.php?showtopic=34459
I think was slightly confused with multiple problems at once but I'm still not able to get all the stuff I need to work.
Charlie
You should use $(PATH_TO_OPEN2X)/bin/sdl-config instead of your default system. You are trying to link x86 libraries against arm objects which is why you are getting errors.
Try -static as well because, if it works, it will remove any library requirements from the gp2x. I haven't had much luck...
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...
You may need to explicitly tell windows to unmount the usb drive, I think it's called "safely remove device" on one of the icons in the system tray. This will probably be more reliable than just unplugging. I know in linux sometimes the writes to a usb device don't actually occur until you...
I got the demo to work, here are the commands:
open2x-gcc -c -Wall -I/usr/local/open2x/include `/usr/local/open2x/bin/sdl-config --cflags` demo.c -o demo.o
open2x-gcc demo.o -o helloworld.gpe `/usr/local/open2x/bin/sdl-config --static-libs` -lgcc -lm -lg -lpthread -lSDL
I don't have any...
I got the same errors with the open2x-gcc but I also found the solution; it was the order of the arguments to open2x-gcc so that the input .o files and the -o argument were first and the rest were later. But alas I now have another problem. The image is no longer being displayed properly it's...
Thank you for trying. I actually already tried that but when I did I got many compile-time complaints about being unable to find SDL_ symbols. I have switched to the open2x toolchain (which is compiling now) in the hopes that clear up some of these issues or if not at least it'll be up-to-date...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.