forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Undefined reference to initGraphics(), blitAlphaImag... etc.

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Crux



Joined: 25 May 2008
Posts: 10

PostPosted: Tue May 27, 2008 12:17 pm    Post subject: Undefined reference to initGraphics(), blitAlphaImag... etc. Reply with quote

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
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Tue May 27, 2008 1:19 pm    Post subject: Reply with quote

SDL?? LUA??? GU??
Back to top
View user's profile Send private message AIM Address
jsharrad



Joined: 20 Oct 2005
Posts: 102

PostPosted: Tue May 27, 2008 4:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Tue May 27, 2008 6:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue May 27, 2008 7:45 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Crux



Joined: 25 May 2008
Posts: 10

PostPosted: Wed May 28, 2008 8:54 am    Post subject: Reply with quote

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
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed May 28, 2008 8:08 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group