Hello, I am currently developing a simple 2 player chess program for the GP2X. It will also have an AI but it will be limited to random moves. I don't want to start with something too complicated.
I am using Dev-C++ from the file gp2xsdk_windows.zip and I compiled a couple of times for the GP2X without problems. Now I need to go back to using SDL in windows so I can ouput debuging hints with printf to fix bugs. In particular, checkmate isn't working, hehe.
I can compile almost every lazyfoo's SDL tutorial without errors. Here is the error I get when I compile my chess program :
It says the error is in function console_main. This is not a function I created.
The compilter's parameters are:
Please help me out on this as I would really like to complete my first big project.
I am using Dev-C++ from the file gp2xsdk_windows.zip and I compiled a couple of times for the GP2X without problems. Now I need to go back to using SDL in windows so I can ouput debuging hints with printf to fix bugs. In particular, checkmate isn't working, hehe.
I can compile almost every lazyfoo's SDL tutorial without errors. Here is the error I get when I compile my chess program :
When I look at the compile log I get :C:\GP2XSDK\lib\libSDLmain.a(SDL_win32_main.o) In function `console_main':
[Linker error] undefined reference to `SDL_main'
C:\GP2XSDK\lib\libSDLmain.a(SDL_win32_main.o) ld returned 1 exit status
Compiler: win
Executing g++.exe...
g++.exe "C:\PROGRAMMATION\kzechecs\kzechecs.cpp" -o "C:\PROGRAMMATION\kzechecs\kzechecs.exe" -DWIN32 -Dmain=SDL_main -I"C:\GP2XSDK\include\GP2X" -I"C:\GP2XSDK\include\SDL" -I"C:\GP2XSDK\lib\gcc\mingw32\3.4.2\include" -I"C:\GP2XSDK\include\c++\3.4.2\backward" -I"C:\GP2XSDK\include\c++\3.4.2\mingw32" -I"C:\GP2XSDK\include\c++\3.4.2" -I"C:\GP2XSDK\include" -L"C:\GP2XSDK\lib" -lmingw32 -lSDLmain -lSDL -lSDL_ttf -lSDL_image -liconv -lgp2x
C:\GP2XSDK\lib/libSDLmain.a(SDL_win32_main.o): In function `console_main':
/home/hercules/public_cvs/SDL12/src/main/win32/SDL_win32_main.c:249: undefined reference to `SDL_main'
collect2: ld returned 1 exit status
Execution terminated
It says the error is in function console_main. This is not a function I created.
The compilter's parameters are:
The linker's parameters are:-DWIN32 -Dmain=SDL_main
-lmingw32 -lSDLmain -lSDL -lSDL_ttf -lSDL_image -liconv -lgp2x
Please help me out on this as I would really like to complete my first big project.