Compiler brings up ALOT of errors
The compiler brings up ALOT of errors, here is the code:
Code:
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspctrl.h>
PSP_MODULE_INFO("Buttons", 0, 1, 1);
#define printf pspDebugScreenPrintf
int exit_callback(void)
{
sceKernelExitGame();
return 0;
}
void CallbackThread(void *arg)
{
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
}
int SetupCallbacks(void)
{
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0)
{
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
int main() {
pspDebugScreenInit();
SetupCallbacks();
int fun = 0;
int counter = 0;
int i = 0;
SceCtrlData pad;
printf("Press X to start the counter");
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CROSS) {
break;
}
}
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CIRCLE) {
break;
}
pspDebugScreenClear();
printf("Press O to stop the counter\n");
printf("Counter: %i", counter);
counter++;
for (i=0, i<5, i++) {
sceDisplayWaitVBlankStart();
}
}
pspDebugScreenClear();
printf("Counter Finished\n");
printf("Final Count: %i\n", counter);
printf("Press TRIANGLE for the next feature");
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_TRIANGLE) {
break;
}
}
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CIRCLE) {
break;
}
pspDebugScreenClear();
printf("Press X to increase the number, O to stop\n");
printf("Number: %i", fun);
if(pad.Buttons & PSP_CTRL_CROSS) {
fun++;
}
}
sceKernelSleepThread();
return 0;
}
I'm not exactly using CYGWIN, I installed the psp sdk and im compiling using the start.bat. Will it work when i install CYGWIN on my other computer?