SDL elf compiled by gccsdk undefined instruction
Liam Farese (12144) 2 posts |
I am new to riscos programming and I have been trying to write a game using sdl, I have set up the gccsdk and have downloaded sdl1.2 and sdl2 through the autobuilder. I can compile the following code however when I try running it on RPCemu I receive the following error message: Internal error: undefined instruction at &00008CD4. #include <SDL/SDL.h> int main(int argc, char* argv[]) { } makefile: CXX = g++ SRCDIR = src SOURCES = $(wildcard $(SRCDIR)/*.cpp) EXECUTABLE = build/!RunImage,ff8 $(EXECUTABLE): $(OBJECTS) $(OBJDIR)/%.o: $(SRCDIR)/%.cpp clean: |
Cameron Cawley (3514) 157 posts |
ELF files on RISC OS have the file type &e1f – &ff8 is for the native AIF executable format. You can convert from ELF to AIF by adding -static to the link flags and using the elf2aif tool supplied with GCCSDK, or you can run ELF files under RISC OS by installing SharedLibs using PackMan. |
Liam Farese (12144) 2 posts |
Thank you! the elf2aif worked perfectly, I have a couple of questions, if my goal is just to create a 2d game, is there any reason to use sdl1.2 over sdl2? Can I compile sdl mixer for sdl2 on gccsdk? thanks. |