Compiling problems

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
ohemsted
Posts: 7
Joined: Sat Apr 22, 2006 12:55 am

Compiling problems

Post by ohemsted »

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

Code: Select all

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: Select all

#include <pspkernel.h>
 #include <pspdebug.h>
 
  PSP_MODULE_INFO&#40;"Hello World", 0, 1, 1&#41;;
 
  #define printf pspDebugScreenPrintf
 
 
   /* Exit callback */
 int exit_callback&#40;int arg1, int arg2, void *common&#41; &#123;
           sceKernelExitGame&#40;&#41;;
           return 0;
 &#125;


 /* Callback thread */
 int CallbackThread&#40;SceSize args, void *argp&#41; &#123;
           int cbid;

           cbid = sceKernelCreateCallback&#40;"Exit Callback", exit_callback, NULL&#41;;
           sceKernelRegisterExitCallback&#40;cbid&#41;;

           sceKernelSleepThreadCB&#40;&#41;;

           return 0;
 &#125;

 /* Sets up the callback thread and returns its thread id */
 int SetupCallbacks&#40;void&#41; &#123;
           int thid = 0;

           thid = sceKernelCreateThread&#40;"update_thread", CallbackThread, 0x11, 0xFA0, 0, 0&#41;;
           if&#40;thid >= 0&#41; &#123;
                     sceKernelStartThread&#40;thid, 0, 0&#41;;
           &#125;

           return thid;
 &#125;
 
  int main&#40;&#41; &#123;
 
  pspDebugScreenInit&#40;&#41;;
  SetupCallbacks&#40;&#41;;

  printf&#40;"Hello World"&#41;;
 
  sceKernelSleepThread&#40;&#41;;
  return 0;
  &#125;
and my make file is:

Code: Select all

TARGET = helloworld
OBJS = main.o

CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $&#40;CFLAGS&#41; -fno-exceptions -fno-rtti
ASFLAGS = $&#40;CFLAGS&#41;

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World

PSPSDK=$&#40;shell psp-config --pspsdk-path&#41;
include $&#40;PSPSDK&#41;/lib/build.mak
Please help.
weltall
Posts: 310
Joined: Fri Feb 20, 2004 1:56 am
Contact:

Post by weltall »

your paths are wrongly set or not set at all for pspdev
ohemsted
Posts: 7
Joined: Sat Apr 22, 2006 12:55 am

I don't understand

Post by ohemsted »

I don't understand I followed the instructions to the letter. Is there anyway I can have it all set up
laichung
Posts: 123
Joined: Fri May 06, 2005 2:02 pm

Re: I don't understand

Post by laichung »

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

Code: Select all

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

  1&#41; Add this to your startup configuration&#58;

   ## PSPDEV SETTINGS
   export PSPDEV="/usr/local/pspdev"
   export PATH="$PATH&#58;$PSPDEV/bin"

  2&#41; Run the script to install the toolchain.

   ./toolchain.pl PSP

  3&#41; Enjoy!
Post Reply