| View previous topic :: View next topic |
| Author |
Message |
ohemsted
Joined: 22 Apr 2006 Posts: 7
|
Posted: Sun Sep 17, 2006 9:02 pm Post subject: Compiling problems |
|
|
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 |
|
 |
weltall
Joined: 20 Feb 2004 Posts: 310
|
Posted: Mon Sep 18, 2006 6:34 am Post subject: |
|
|
| your paths are wrongly set or not set at all for pspdev |
|
| Back to top |
|
 |
ohemsted
Joined: 22 Apr 2006 Posts: 7
|
Posted: Tue Sep 19, 2006 3:35 am Post subject: I don't understand |
|
|
| I don't understand I followed the instructions to the letter. Is there anyway I can have it all set up |
|
| Back to top |
|
 |
laichung
Joined: 06 May 2005 Posts: 123
|
Posted: Tue Sep 19, 2006 6:08 pm Post subject: Re: I don't understand |
|
|
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 |
|
 |
|