/usr/share/psp-dev/bin/../lib/gcc/psp/4.3.2/../../../../psp/lib/crt0.o: In function `_main':
/tmp/psptoolchain/build/pspsdk/src/startup/crt0.c:86: undefined reference to `main'
collect2: ld returned 1 exit status
int ttd_main(int argc, char *argv[])
in openttd.cpp.
Even if I rename ttd_main to main, I get the same error.
But it compiles fine for Linux.
But it is an SDL application. So if I link SDLmain, it should work, but
it doesn't.
int ttd_main(int argc, char *argv[])
in openttd.cpp.
Even if I rename ttd_main to main, I get the same error.
But it compiles fine for Linux.
But it is an SDL application. So if I link SDLmain, it should work, but
it doesn't.
Don't use SDL. It's verry slow. Try oslib as graphics engine.
if you use SDL_MAIN it declare for you a main() function but within this function
a call has been made to sdl_main(int argc,char **argv) to init you SDL program
so it is normal that you've got a undefined reference to `SDL_main'n if you don't provide a sdl_main function
int main(int argc, char *argv[])
{
pspDebugScreenInit();
sdl_psp_setup_callbacks();
/* Register sceKernelExitGame() to be called when we exit */
atexit(sceKernelExitGame);
The code does not provide such a function. But the code, that compiles,
doesn't, too.
Maybe you could have a look on it.
The one I am working on is here: http://www.openttd.org/en/
It is the version 0.7.2, which I configured
The working one is here: http://sourceforge.net/projects/openttd-psp
It is the version 0.5.3, which compiles and runs fine.
But as I said, both don't provide such a function.