| View previous topic :: View next topic |
| Author |
Message |
Crux
Joined: 25 May 2008 Posts: 10
|
Posted: Tue May 27, 2008 12:17 pm Post subject: Undefined reference to initGraphics(), blitAlphaImag... etc. |
|
|
undefined reference to initGraphics(), loadImage(), blitAlphaImageToScreen, and flipScreen()
Thats basically the error its throwing. I'm wondering is this because of my lack of correctly installing something? I have the make file correctly pointed to graphics.h and framebuffer.h but it doesn't seem to want to work.
Any ideas?
| Code: | TARGET = hello
OBJS = main.o ../includes/graphics.o ../includes/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 = Tutorial
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak |
|
|
| Back to top |
|
 |
Wally

Joined: 26 Sep 2005 Posts: 672
|
Posted: Tue May 27, 2008 1:19 pm Post subject: |
|
|
| SDL?? LUA??? GU?? |
|
| Back to top |
|
 |
jsharrad
Joined: 20 Oct 2005 Posts: 102
|
Posted: Tue May 27, 2008 4:15 pm Post subject: |
|
|
| If you're using c++, you need to wrap those graphics headers in an 'extern "C" { }', although I don't see you linking the c++ library so that may not be your problem. ;) |
|
| Back to top |
|
 |
Pirata Nervo
Joined: 09 Oct 2007 Posts: 409
|
Posted: Tue May 27, 2008 6:15 pm Post subject: |
|
|
are you sure the path is correct?
../ means one directory up, remember that. (I guess you already know)
did you add graphics.h to your includes?
#include <graphics.h> _________________
Upgrade your PSP |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Tue May 27, 2008 7:45 pm Post subject: |
|
|
| Pirate's right... that path is funky. Who puts a c file in the INCLUDES directory? You're telling the compiler to compile the files "graphics.c" and "framebuffer.c" from the directory "../includes". While the h files may be there, I rather doubt the c files are. |
|
| Back to top |
|
 |
Crux
Joined: 25 May 2008 Posts: 10
|
Posted: Wed May 28, 2008 8:54 am Post subject: |
|
|
Hey guys thanks for all the replies (and the laugh from Wally4000)
And yes I am running tests in one folder while I am actually compiling the final program in another. So the path ../ is correct (I know it seems silly but it keeps things organized for me). The C++ files and the Header files are both located in there.
I decided the best route was to restart the cygwin installation, so i've removed everything and started over. I'll reply here if it fixes. If anyone else has any other suggestions that would be great. Thanks!
EDIT: Also graphics.h is in the includes. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed May 28, 2008 8:08 pm Post subject: |
|
|
| Crux wrote: |
EDIT: Also graphics.h is in the includes. |
Look at your object line again:
| Code: | | OBJS = main.o ../includes/graphics.o ../includes/framebuffer.o |
That says look for graphics.c and framebuffer.c in "../includes/", not the h files. |
|
| Back to top |
|
 |
|