I'm trying to compile simple program for GP2X - I'm using GP2XSDK in Windows with DevCpp
This program only draws 2 lines (with SDL+SDL-gfx), waits few seconds and finishes.
In DevCpp I have 2 compilers profiles - win and gp2x. I am able to compile .exe and run it so sdl_gfx runs OK in windows.
When I tried gp2x compiler profile with "lineRGBA..." lines commented it created .gpe and it ran OK on GP2X, when these lines are not commented error msg appears :
" [Linker error] undefined reference to `lineRGBA' " (path to gfx libraries and header files is correct)
I tried to replace libsdl_gfx.* libraries with theoddbot-libs but there was error - it said my program used hardware FP and these libraries use software FP
My compiler & linker parameters :
-static -lpthread -lm -DGP2X
-lmingw32 -lSDLmain -lSDL -lSDL_gfx
Thanks for any ideas....
This program only draws 2 lines (with SDL+SDL-gfx), waits few seconds and finishes.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <cstring>
using namespace std;
#include "SDL\SDL.h"
#include "SDL\SDL_gfxPrimitives.h"
int main( int argc, char* args[] )
{
SDL_Surface *screen;
if (SDL_Init( SDL_INIT_VIDEO )<0) {cout<<"Video mode initialization FAILED !";return 1;}
screen = SDL_SetVideoMode( 320, 240, 16, SDL_SWSURFACE); if (!screen){cout<<"Couldn't set video mode";return 1;}
lineRGBA(screen, 0, 0, 320, 240, 120,120,120,255);
lineRGBA(screen, 0, 240, 320, 0, 120,120,120,255);
SDL_Flip(screen);
SDL_Delay(2000);
SDL_Quit();
return 0;
}
In DevCpp I have 2 compilers profiles - win and gp2x. I am able to compile .exe and run it so sdl_gfx runs OK in windows.
When I tried gp2x compiler profile with "lineRGBA..." lines commented it created .gpe and it ran OK on GP2X, when these lines are not commented error msg appears :
" [Linker error] undefined reference to `lineRGBA' " (path to gfx libraries and header files is correct)
I tried to replace libsdl_gfx.* libraries with theoddbot-libs but there was error - it said my program used hardware FP and these libraries use software FP
My compiler & linker parameters :
-static -lpthread -lm -DGP2X
-lmingw32 -lSDLmain -lSDL -lSDL_gfx
Thanks for any ideas....