| View previous topic :: View next topic |
| Author |
Message |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Tue Jul 21, 2009 2:49 pm Post subject: undefined reference intraFont |
|
|
this is the error
| Code: | psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -I./header -I/usr/local/pspdev/include -I/usr/local/pspdev/psp/include -I/usr/local/pspdev/psp/include/c++/4.3.3 -I/usr/local/pspdev/psp/sdk/include -I. -I/usr/local/pspdev/psp/sdk/include -I./header -I/usr/local/pspdev/include -I/usr/local/pspdev/psp/include -I/usr/local/pspdev/psp/include/c++/4.3.3 -I/usr/local/pspdev/psp/sdk/include -fexceptions -frtti -D_PSP_FW_VERSION=150 -c -o src/Font.o src/Font.cpp
src/Font.cpp: In member function ‘void objdraw::Font::setEncoding(unsigned int)’:
src/Font.cpp:67: error: ‘intraFontSetEncoding’ was not declared in this scope
src/Font.cpp: In member function ‘void objdraw::Font::setAlternateFont(objdraw::Font*)’:
src/Font.cpp:72: error: ‘intraFontSetAltFont’ was not declared in this scope
src/Font.cpp: In member function ‘float objdraw::Font::printUCS2Ex(float, float, const short unsigned int*, int)’:
src/Font.cpp:87: error: ‘intraFontPrintUCS2Ex’ was not declared in this scope
src/Font.cpp: In member function ‘float objdraw::Font::printColumnUCS2(float, float, float, const short unsigned int*)’:
src/Font.cpp:93: error: ‘intraFontPrintColumnUCS2’ was not declared in this scope
src/Font.cpp: In member function ‘float objdraw::Font::printColumnUCS2Ex(float, float, float, const short unsigned int*, int)’:
src/Font.cpp:99: error: ‘intraFontPrintColumnUCS2Ex’ was not declared in this scope
make: *** [src/Font.o] Error 1 |
this is the makefile
| Code: | PSPSDK=$(shell psp-config --pspsdk-path)
TARGET_LIB = libobjdraw++.a
OBJS = src/Object.o \
src/GraphicsInstance.o \
src/Color.o \
src/Location.o \
src/KeyListener.o \
src/CanvasManager.o \
src/DrawingCanvas.o \
src/DrawableInterface.o \
src/Drawable1DInterface.o \
src/Drawable2DInterface.o \
src/Resizable2DInterface.o \
src/Line.o \
src/FilledRect.o \
src/FramedRect.o \
src/Font.o \
src/Text.o \
src/Image.o \
src/imageutil/ImageUtil.o \
src/imageutil/ImageUtil_png.o
INCDIR =
CFLAGS = -O2 -G0 -Wall -g
CXXFLAGS = $(CFLAGS) -fexceptions -frtti
ASFLAGS = $(CFLAGS)
INCS = -I./header \
-I/usr/local/pspdev/include \
-I/usr/local/pspdev/psp/include \
-I/usr/local/pspdev/psp/include/c++/4.3.3 \
-I/usr/local/pspdev/psp/sdk/include
CFLAGS := $(INCS)
LIBDIR =
LDFLAGS =
LIBS = -lintraFont -lpspgum -lpspgu -lpspvalloc -lpsprtc -lstdc++ -lm
include $(PSPSDK)/lib/build.mak |
and i have intraFont installed through a custom makefile and as for the other intraFont functions they don't complain about it and the header file is correct and the library is correct because i made a lib makefile for intraFont 3.1 so why do i have this error |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Tue Jul 21, 2009 2:55 pm Post subject: |
|
|
one more thing here is the makefile i made for intraFont in case anyone wants to use it
| Code: | #makefile for intraFont for PSP
#by kehon
PSPSDK=$(shell psp-config --pspsdk-path)
PSPDEV=$(shell psp-config --psp-prefix)
PSPBIN=$(PSPDEV)/bin
INSTALL_DIR=$(PSPDEV)/include/
TARGET_LIB = libintraFont.a
OBJS := intraFont.o libccc.o
INCDIR =
CFLAGS = -O2 -G0 -Wall -g
CFLAGS += -I./include
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
LIBS =
include $(PSPSDK)/lib/build.mak
install:
@mkdir -p $(INSTALL_DIR)
cp -f libccc.h $(INSTALL_DIR)
cp -f intraFont.h $(INSTALL_DIR)
@mkdir -p $(PSPDEV)/lib
cp -f $(TARGET_LIB) $(PSPDEV)/lib
@echo
@echo "** Headerfiles installed in $(INSTALL_DIR)"
@echo "** Library files installed in $(PSPDEV)/lib" |
|
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Jul 22, 2009 1:23 am Post subject: |
|
|
| Check which version of intraFont you're using... there have been BIG changes to intraFont that required changes to programs using intraFont. |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Wed Jul 22, 2009 5:00 am Post subject: |
|
|
| J.F. wrote: | | Check which version of intraFont you're using... there have been BIG changes to intraFont that required changes to programs using intraFont. |
i'm using 0.31 and i compiled with 0.31 |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Jul 22, 2009 6:40 am Post subject: |
|
|
| What I meant was the functions themselves have changed - in name, function, etc, over time. You may be trying to use an "old" function that was eliminated or changed. Go through YOUR code and change it to use intraFont as it is NOW, not how it was X revisions ago. |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Wed Jul 22, 2009 6:43 am Post subject: |
|
|
| this is my first time using intraFont so the functions i'm using are straight from the header file and included in there |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Wed Jul 22, 2009 6:58 am Post subject: |
|
|
| why is it that oslib although not included in the makefile weighs in on a factor in this intratrafont is in pspdev/include/intrafont.h and also in pspdev/include/oslib/intrafont/intrafont.h why is it included first because its whats causing the compile error cause i update oslib and no problem except for the stuff that intraFont 0.30 doesnt have because i'm trying to use 0.31 |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Jul 22, 2009 7:45 am Post subject: |
|
|
That last post made no sense at all. :)
Don't try to turn intraFont into C++ if you don't know what you're doing in C++ (that's the errors in your first post - ignorance of C++ errors). Leave it as C and make sure it has those extern "C" {} in the h file. |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Wed Jul 22, 2009 9:10 am Post subject: |
|
|
| J.F. wrote: | That last post made no sense at all. :)
Don't try to turn intraFont into C++ if you don't know what you're doing in C++ (that's the errors in your first post - ignorance of C++ errors). Leave it as C and make sure it has those extern "C" {} in the h file. |
wow um i didnt and they are externed it seems for some reason that instead of the compile using pspdev/psp/include/intrafont.h it is using pspdev/psp/include/oslib/intrafont/intrafont.h which oslib's intrafont is not as up to date as mine so when i updated oslibmod it worked except its still one version behind mine so i know how to fix it i just want to know why oslib's intrafont is being used instead of mine |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Jul 22, 2009 2:12 pm Post subject: |
|
|
| Sounds like you should try to separate the two. Maybe update the intraFont in OSLib and then quit using it separate from that. Seriously, this is why I hate C++. Even when you know what you're doing, it's a royal pain in the ass. I never write any on my own stuff in C++, and dislike working on C++ projects, though I can do it (like Basilisk II or DaedalusX64). |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Thu Jul 23, 2009 6:42 am Post subject: |
|
|
| aha i found the problem it's not oslib directly (well sorta) in my Color class i included oslib because i had used the class a while ago and i removed the include now it works thats why oslib's intrafont overide mine |
|
| Back to top |
|
 |
|