| View previous topic :: View next topic |
| Author |
Message |
XTC42
Joined: 04 Aug 2007 Posts: 4
|
Posted: Sat Aug 04, 2007 10:57 am Post subject: PLZ Help a noob |
|
|
I am using CYGWIN and the newest PSPDEV Please help as im trying to make a simple hello world app. THANKS
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: | $ 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: | 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: | // 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. |
|
| Back to top |
|
 |
crazyc
Joined: 17 Jun 2005 Posts: 410
|
Posted: Sat Aug 04, 2007 11:07 am Post subject: |
|
|
Letter O.
| Quote: | | PSP_MODULE_INFO("Hellow World", 0, 1, 1) | and | Quote: | | printf("Hellow World its Joey A.K.A. XTC") |
Semicolons after these. |
|
| Back to top |
|
 |
XTC42
Joined: 04 Aug 2007 Posts: 4
|
Posted: Sat Aug 04, 2007 11:36 am Post subject: |
|
|
Thanks for helping Crazyc i did what u told me but now when I type "make"
I get this
Edited |
|
| Back to top |
|
 |
Wally

Joined: 26 Sep 2005 Posts: 672
|
Posted: Sat Aug 04, 2007 12:03 pm Post subject: |
|
|
I got a feeling you are using ' rather than `
press the key with the ~ symbol instead of the talking mark where the talking mark is in your code |
|
| Back to top |
|
 |
XTC42
Joined: 04 Aug 2007 Posts: 4
|
Posted: Sat Aug 04, 2007 12:06 pm Post subject: |
|
|
| I dont think i even used those lol |
|
| Back to top |
|
 |
XTC42
Joined: 04 Aug 2007 Posts: 4
|
Posted: Sat Aug 04, 2007 12:10 pm Post subject: |
|
|
Oh wait i see...
thanks i got a eboot let me try it
EDIT: SWEET IT WORKED!!!! THANKS SOO MUCH
SRY about the double post BTW
but im soo excited I just took my first step into learning C for the psp. THANK YOU SOOOO MUCH...
finished product (kinda lame but im proud)
http://snookemx.googlepages.com/Myfirstc.zip |
|
| Back to top |
|
 |
|