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 

Compiling problems

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



Joined: 22 Apr 2006
Posts: 7

PostPosted: Sun Sep 17, 2006 9:02 pm    Post subject: Compiling problems Reply with quote

I have been trying to compile 'hello world' with the SDK. When I do I get these errors:

Code:
make: psp-config: Command not found
makefile:12: /lib/build.mak: No such file or directory
make: *** No rule to make target `/lib/build.mak'.  Stop.


The code in the helloworld file is:

Code:
#include <pspkernel.h>
 #include <pspdebug.h>
 
  PSP_MODULE_INFO("Hello 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("Hello World");
 
  sceKernelSleepThread();
  return 0;
  }


and my make file is:

Code:

TARGET = helloworld
OBJS = main.o

CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak


Please help.
Back to top
View user's profile Send private message
weltall



Joined: 20 Feb 2004
Posts: 310

PostPosted: Mon Sep 18, 2006 6:34 am    Post subject: Reply with quote

your paths are wrongly set or not set at all for pspdev
Back to top
View user's profile Send private message Visit poster's website
ohemsted



Joined: 22 Apr 2006
Posts: 7

PostPosted: Tue Sep 19, 2006 3:35 am    Post subject: I don't understand Reply with quote

I don't understand I followed the instructions to the letter. Is there anyway I can have it all set up
Back to top
View user's profile Send private message
laichung



Joined: 06 May 2005
Posts: 123

PostPosted: Tue Sep 19, 2006 6:08 pm    Post subject: Re: I don't understand Reply with quote

if you look at the toolchain document deep enough, you will find this :

Code:

  #####################################
  ## HOW DO I RUN THIS FANCY SCRIPT? ##
  #####################################

  1) Add this to your startup configuration:

   ## PSPDEV SETTINGS
   export PSPDEV="/usr/local/pspdev"
   export PATH="$PATH:$PSPDEV/bin"

  2) Run the script to install the toolchain.

   ./toolchain.pl PSP

  3) Enjoy!
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