forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PLZ Help a noob

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
XTC42



Joined: 04 Aug 2007
Posts: 4

PostPosted: Sat Aug 04, 2007 10:57 am    Post subject: PLZ Help a noob Reply with quote

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
View user's profile Send private message
crazyc



Joined: 17 Jun 2005
Posts: 410

PostPosted: Sat Aug 04, 2007 11:07 am    Post subject: Reply with quote

Quote:
-02

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
View user's profile Send private message
XTC42



Joined: 04 Aug 2007
Posts: 4

PostPosted: Sat Aug 04, 2007 11:36 am    Post subject: Reply with quote

Thanks for helping Crazyc i did what u told me but now when I type "make"

I get this



Edited
Back to top
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Sat Aug 04, 2007 12:03 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
XTC42



Joined: 04 Aug 2007
Posts: 4

PostPosted: Sat Aug 04, 2007 12:06 pm    Post subject: Reply with quote

I dont think i even used those lol
Back to top
View user's profile Send private message
XTC42



Joined: 04 Aug 2007
Posts: 4

PostPosted: Sat Aug 04, 2007 12:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group