Makefile

Fermé
tchec999 Messages postés 14 Date d'inscription mardi 22 avril 2008 Statut Membre Dernière intervention 16 novembre 2008 - 25 juil. 2008 à 17:18
tchec999 Messages postés 14 Date d'inscription mardi 22 avril 2008 Statut Membre Dernière intervention 16 novembre 2008 - 25 juil. 2008 à 17:38
Bonjour,
Je suit en train de tester la programation sur psp j'ai donc suivi un tutorial et installer cygwin et créé deux fichier l'un est le code source:
//Hello world
/*
Ce programme à été crée par Toto le 21/03/06
Affichage de la chaine "hello world!"
/*

#include
#include

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!");
scrKernelSleepThread();
return 0;
}
et l'autre un makefile qui contient:
TARGET = hello
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
mais quand je compile cygwin me dit le méssage d'érreur suivant: ***missing separator stop
donc je voudrait savoir si je me suis trompé quelque part ou si c'est un autre probleme(j'utilise windows vista)merci!

2 réponses

Hobit53 Messages postés 3 Date d'inscription vendredi 25 juillet 2008 Statut Membre Dernière intervention 5 août 2008 1
25 juil. 2008 à 17:27
Il faut remplacer les 2 lignes incomplètes "# include" par:
#include <pspkernel.h>
#include <pspdebug.h>

http://www.pspprog.fr/tutoriels_C_2.php
0
tchec999 Messages postés 14 Date d'inscription mardi 22 avril 2008 Statut Membre Dernière intervention 16 novembre 2008 1
25 juil. 2008 à 17:38
C'est bizare, j'ai remplacé les includes par ceux que tu m'a dit mais ca me dit toujours la même chose.
0