| View previous topic :: View next topic |
| Author |
Message |
AntiBNI
Joined: 24 Sep 2007 Posts: 15 Location: Planet Earth
|
Posted: Wed Oct 03, 2007 11:33 am Post subject: *** No rule to make target `graphics.o' |
|
|
Im getting that error :
make: *** No rule to make target `graphics.o', needed by `hello.elf'
every time i try to incorporate graphics.h into my app.
Any ideas?
*Edit*
This is my Makefile
| Code: |
TARGET = hello
OBJS = main.o graphics.o framebuffer.o
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS = -lpspgu -lpng -lz -lm
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Dump
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
|
Thanks...
AntiBNI |
|
| Back to top |
|
 |
Wally

Joined: 26 Sep 2005 Posts: 672
|
Posted: Wed Oct 03, 2007 1:10 pm Post subject: |
|
|
Whereabouts is graphics.h hidden?
I got a feeling you havent linked them properly.
Try to keep them in the same directory unless you know what you are doing :P |
|
| Back to top |
|
 |
FreePlay
Joined: 04 Jan 2006 Posts: 71 Location: Schenectady, New York, USA
|
Posted: Wed Oct 03, 2007 1:37 pm Post subject: |
|
|
Do you have graphics.c and framebuffer.c in there?
It's trying to build the object files. The error you get implies that you don't actually have the code for them anywhere. |
|
| Back to top |
|
 |
AntiBNI
Joined: 24 Sep 2007 Posts: 15 Location: Planet Earth
|
Posted: Wed Oct 03, 2007 8:34 pm Post subject: |
|
|
| where should they be in? |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Oct 03, 2007 9:28 pm Post subject: |
|
|
| Given your makefile, the same directory main.c is in. |
|
| Back to top |
|
 |
AntiBNI
Joined: 24 Sep 2007 Posts: 15 Location: Planet Earth
|
Posted: Wed Oct 03, 2007 10:06 pm Post subject: |
|
|
oh,lol xD
Il try it when i get home cuz im at the University right now.
Thnaks for the answer. |
|
| Back to top |
|
 |
AntiBNI
Joined: 24 Sep 2007 Posts: 15 Location: Planet Earth
|
Posted: Thu Oct 04, 2007 7:53 am Post subject: |
|
|
I have placed graphics.h and graphics.c in the same directory of my app and now i get an error like if i wouldn't been calling the graphics lib o.0
like
undefined reference to 'initGraphics()' and stuff
Im just experimenting with PNGs with PSP tho,il work on a brew after i finish with this error >_<
heres my code and here is my make file.
Code:
| Code: |
//PSP Header Files
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <pspdisplay.h>
#include <pspgu.h>
#include <png.h>
#include <stdio.h>
#include "graphics.h"
//This is the programs (Prog Name,major ver,minor ver)
PSP_MODULE_INFO ("Dump",0,1,1);
//Define Print as pspDebugScreenPrintf
#define printf pspDebugScreenPrintf
//Code Body
SceCtrlData pad;
int main()
{
char buffer[200];
Image* ourImage;
pspDebugScreenInit();
initGraphics();
sprintf(buffer, "ourImage.png");
ourImage = loadImage(buffer);
blitAlphaImageToScreen(0 ,0 ,480 , 272, ourImage, 0, 0);
flipScreen();
sceCtrlReadBufferPositive(&pad, 1);
while (1)
{
if(pad.Buttons & PSP_CTRL_SQUARE)
{
sceKernelExitGame();
}
}
//end if
//Pause untill user press "Home"
sceKernelSleepThread();
return 0;
}
// end of code
|
Makefile:
| Code: | TARGET = hello
OBJS = main.o graphics.o framebuffer.o
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS = -lpspgu -lpng -lz -lm
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Image Example
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak |
I don't know whats with the error...
Thanks. |
|
| Back to top |
|
 |
|