I surprisingly succeeded to compile Mr. Spiv's h3.tgz/'rotozoomer' in a very short time. But I had to change the compiler in my Makefile from g++ to gcc because otherwise I got a linker error saying 'undefined reference to swi_mmu_change() and ARMDisableInterrupt'.
With a text search I recognized that:
1) swi_mmu_change() is only in libgpstdlib.a, but not in it's c++ equivalent (in no other .a file at all)
2) same with ARMDisableInterrupt()
I want to use swi_mmu_change in my own code, but I always write c++ style (I don't speak about classes here, I just don't declare all variables at the beginning, I use functions with same name but different types etc.)
That'll be hell if I'd have to change all my .cpp files to .c stylish ones just to use functions like swi_mmu_change, ARMDisableInterrupt, EnableCache() etc. (And I am not that asm expert to use asm volatiles instead of the functions.)
So I wanted to be clever and I just did one single 'graphics.c' file (and kept the other files .cpp). But now I get undefined references to all my functions from graphics.c. (The linker call has still _all_ .o files, so should be still correct.) Is it possible that graphics.o (in c style) is incompatible with ('unreadable from') all the other .o (in c++ style) ??? I never heard about something like that, I always thought one can link whatever output .o files one likes (asm, pascal, c, c++ etc.....)
Is there anything I can do to get either swi_mmu_change() etc. working _without_ plain C code or to get working combined c/c++ code?
With a text search I recognized that:
1) swi_mmu_change() is only in libgpstdlib.a, but not in it's c++ equivalent (in no other .a file at all)
2) same with ARMDisableInterrupt()
I want to use swi_mmu_change in my own code, but I always write c++ style (I don't speak about classes here, I just don't declare all variables at the beginning, I use functions with same name but different types etc.)
That'll be hell if I'd have to change all my .cpp files to .c stylish ones just to use functions like swi_mmu_change, ARMDisableInterrupt, EnableCache() etc. (And I am not that asm expert to use asm volatiles instead of the functions.)
So I wanted to be clever and I just did one single 'graphics.c' file (and kept the other files .cpp). But now I get undefined references to all my functions from graphics.c. (The linker call has still _all_ .o files, so should be still correct.) Is it possible that graphics.o (in c style) is incompatible with ('unreadable from') all the other .o (in c++ style) ??? I never heard about something like that, I always thought one can link whatever output .o files one likes (asm, pascal, c, c++ etc.....)
Is there anything I can do to get either swi_mmu_change() etc. working _without_ plain C code or to get working combined c/c++ code?