I keep getting this error in cygwin when i type "make"
(might not be 100% correct because i had to type it out since cygwin doesnt let you copy and paste)
Code: Select all
$ make
psp-gcc -I. -I/user/local/pspdev/psp/sdk/include -02 -G0 -Wall -D_PSP_FW_VERSION=
150 -L. -L/usr/local/pspdev/psp/sdk/lib main.c -1pspnet_apct1 -1pspnet_resolve
r -1psputility -1pspuser -1pspkernel -o hello.elf
psp-gcc: unrecognized option '-02
main.c:13: error: expected ',' or ';' before 'int'
main.c: In function 'CallbackThread':
main.c:22: error: 'exit_callback' undeclared <first use in this function>
main.c:22: error: <Each undeclared identifier is reported only once
main.c:22: error: for each function it appears in.>
main.c: In function 'main':
main.c:46: error: expected ';' before 'sceKernelSleepThread'
Make: *** [hello.elf] Error 1
MAKEFILE:
(make file is 100% what i typed)
Code: Select all
TARGET = hello
OBJS = main.c
CFLAGS = -02 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exeptions -fno-rtti
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Joey's Hellow World
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
last but not least the C:
(C is 100% what i typed)
Code: Select all
// Hello World - My first APP for the psp
/*
This program was created by Joey Stout on Friday augest 3 2007
It is a simple "hello world" App
*/
#include <pspkernel.h>
#include <pspdebug.h>
PSP_MODULE_INFO("Hellow World", 0, 1, 1)
#define printf pspDebugScreenPrintf
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
/* Sets up the callback thread and returns its thread id */
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();
printf("Hellow World its Joey A.K.A. XTC")
sceKernelSleepThread();
return 0;
}
Thank you so much.