[SOLVED] Trouble using ODE

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Snilmerg
Posts: 3
Joined: Thu Jan 29, 2009 12:49 am

[SOLVED] Trouble using ODE

Post by Snilmerg »

Hello,

I am trying LTE engine and ODE.

Before anything : I have updated my local copy of the pspsdk source code with a "svn update", than ran psptoolchain to update the installation. I than compiled ODE lib, and installed the headers in /usr/local/pspdev/psp/include, and the libode.a in /usr/local/pspdev/psp/lib.

This done, I started with a sample (06.2DGraphics) provided with the LTE source code. I added my own ODE code. Now I am getting the following errors (undifined refs to sqrtf, sinf, and various math.h function) when compiling, dispite the fact I have the right link options (-lode -lm) ... I don't get it. Note that the sample compiled and ran fine before I use ODE. Did someone already have such messages or have any idea of what the problem is.

Code: Select all

regis@Voyager [04-09-09 18:58:28] ~/Desktop/pspdev/lte-slim-beta-48/LTE/examples/06.2DGraphics $ make clean all
rm -f 2DGraphics.prx 2DGraphics.elf main.o PARAM.SFO EBOOT.PBP EBOOT.PBP
psp-g++ -I../../include/ -I. -I/usr/local/pspdev/psp/sdk/include -G0  -O2 -I../../include/ -I. -I/usr/local/pspdev/psp/sdk/include -G0  -O2 -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=390   -c -o main.o main.cpp
psp-gcc -I../../include/ -I. -I/usr/local/pspdev/psp/sdk/include -G0  -O2 -D_PSP_FW_VERSION=390  -L../../libs -L-L/usr/local/pspdev/psp/lib -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx   main.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lengine -lpspwlan -lglut -lGLU -lGL -lm -lpspvfpu -lstdc++ -lpsppower -lpsprtc -lpspaudio -lode -ldrawstuff -lpspdebug -lpspsdk -lc -lpsputility -lpspuser -lpspkernel -lpspdisplay -lpspge -lpspctrl -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o 2DGraphics.elf
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(ode.o): In function `dWorldGetAutoDisableAngularThreshold':
ode/src/ode.cpp:1354: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(ode.o): In function `dWorldGetAutoDisableLinearThreshold':
ode/src/ode.cpp:1340: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(ode.o): In function `dBodyGetAutoDisableAngularThreshold':
ode/src/ode.cpp:798: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(ode.o): In function `dBodyGetAutoDisableLinearThreshold':
ode/src/ode.cpp:784: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(util.o): In function `sinc':
ode/src/util.cpp:85: undefined reference to `sinf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(util.o): In function `dxStepBody(dxBody*, float)':
ode/src/util.cpp:127: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(joint.o): In function `amotorComputeEulerAngles':
ode/src/joint.cpp:2348: undefined reference to `atan2f'
ode/src/joint.cpp:2352: undefined reference to `atan2f'
ode/src/joint.cpp:2356: undefined reference to `atan2f'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(joint.o): In function `measureHinge2Angle':
ode/src/joint.cpp:1462: undefined reference to `atan2f'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(joint.o): In function `dJointSetHinge2Axis2':
ode/src/joint.cpp:1657: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(joint.o): In function `dJointSetHinge2Axis1':
ode/src/joint.cpp:1634: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(joint.o): In function `getHingeAngleFromRelativeQuat':
ode/src/joint.cpp:334: undefined reference to `sqrtf'
ode/src/joint.cpp:337: undefined reference to `atan2f'
ode/src/joint.cpp:337: undefined reference to `atan2f'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(joint.o): In function `hinge2GetInfo2':
ode/src/joint.cpp:1532: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(collision_std.o): In function `make_sure_plane_normal_has_unit_length':
ode/src/collision_std.cpp:339: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(collision_std.o): In function `dGeomCCylinderPointDepth':
ode/src/collision_std.cpp:329: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(collision_std.o): In function `dGeomSpherePointDepth':
ode/src/collision_std.cpp:132: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(collision_std.o): In function `ray_sphere_helper':
ode/src/collision_std.cpp:1604: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(collision_std.o):ode/src/collision_std.cpp:1804: more undefined references to `sqrtf' follow
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(collision_std.o): In function `cullPoints(int, float*, int, int, int*)':
ode/src/collision_std.cpp:666: undefined reference to `atan2f'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(collision_std.o): In function `dBoxBox(float const*, float const*, float const*, float const*, float const*, float const*, float*, float*, int*, int, dContactGeom*, int)':
ode/src/collision_std.cpp:805: undefined reference to `sqrtf'
ode/src/collision_std.cpp:806: undefined reference to `sqrtf'
ode/src/collision_std.cpp:807: undefined reference to `sqrtf'
ode/src/collision_std.cpp:810: undefined reference to `sqrtf'
ode/src/collision_std.cpp:811: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(collision_std.o):ode/src/collision_std.cpp:812: more undefined references to `sqrtf' follow
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(rotation.o): In function `dQFromAxisAndAngle':
ode/src/rotation.cpp:167: undefined reference to `sinf'
ode/src/rotation.cpp:167: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(rotation.o): In function `dRFromEulerAngles':
ode/src/rotation.cpp:72: undefined reference to `sinf'
ode/src/rotation.cpp:74: undefined reference to `sinf'
ode/src/rotation.cpp:76: undefined reference to `sinf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(rotation.o): In function `dRFrom2Axes':
ode/src/rotation.cpp:95: undefined reference to `sqrtf'
ode/src/rotation.cpp:108: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(collision_util.o): In function `dDISTANCE(float const*, float const*)':
include/ode/odemath.h:126: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(OPC_LSSCollider.o):OPCODE/OPC_LSSCollider.cpp:244: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(IcePoint.o): In function `Normalize':
OPCODE/Ice/IcePoint.h:274: undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libode.a(IcePoint.o):OPCODE/Ice/IcePoint.h:274: more undefined references to `sqrtf' follow
collect2: ld returned 1 exit status
make: *** [2DGraphics.elf] Error 1
regis@Voyager [04-09-09 18:59:46] ~/Desktop/pspdev/lte-slim-beta-48/LTE/examples/06.2DGraphics $ 

Obiously the "libm.a" is well found by the linker, but it can't found the functions sqrtf and others in it. In ODE source code, I found this, which looks fine to me :

Code: Select all

#define REAL(x) (x ## f)					/* form a constant */
#define dRecip(x) ((float)(1.0f/(x)))				/* reciprocal */
#define dSqrt(x) ((float)sqrtf(float(x)))			/* square root */
#define dRecipSqrt(x) ((float)(1.0f/sqrtf(float(x))))		/* reciprocal square root */
#define dSin(x) ((float)sinf(float(x)))				/* sine */
#define dCos(x) ((float)cosf(float(x)))				/* cosine */
#define dFabs(x) ((float)fabsf(float(x)))			/* absolute value */
#define dAtan2(y,x) ((float)atan2f(float(y),float(x)))		/* arc tangent with 2 args */
#define dFMod(a,b) ((float)fmodf(float(a),float(b)))		/* modulo */
#define dCopySign(a,b) ((float)copysignf(float(a),float(b)))

Last edited by Snilmerg on Sat Sep 05, 2009 8:47 pm, edited 1 time in total.
Dariusc123456
Posts: 388
Joined: Tue Aug 12, 2008 12:46 am

Post by Dariusc123456 »

What does your makefile look like? Maybe you download an out-of-date version.
PSHN - Playstation Hacking Network
PSX/PS1 - HACK - Game Shark
PS2 - HACK - Swap
PSP - HACK - Pandora
PS3 - ?
Snilmerg
Posts: 3
Joined: Thu Jan 29, 2009 12:49 am

Post by Snilmerg »

Thanks for answering.

Indeed, the LTE version I use is not the latest from ltestudio, but examples do compile and work on my PSP. It is just a problem of compiling with ODE. Also, I try to simply use the "sqrt" function in the unmodified original version of the sample program provided with my source code of LTE (so basicly I just added somthing like "double test = sqrt (double blabla);") and it compiled and ran fine. So I guess I just have a problem in linking with ODE using those math function, I just don't know where the problem is.

Code: Select all

regis@Voyager [05-09-09 03:22:27] ~/Desktop/pspdev/lte-slim-beta-48/LTE/examples/06.2DGraphics $ more Makefile 
TARGET = 2DGraphics
OBJS = main.o

INCDIR = ../../include/
CFLAGS = -G0  -O2
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

BUILD_PRX = 1
PSP_FW_VERSION = 390
PSP_LARGE_MEMORY = 1

LIBDIR = ../../libs 
LDFLAGS =
LIBS= -lengine -lpspwlan -lglut -lGLU -lGL -lm -lpspvfpu -lstdc++ -lpsppower -lpsprtc -lpspaudio -lode -ldrawstuff -lpspdebug -lpspsdk -lc -lpsputility -lpspuser -lpspkernel -lpspdisplay -lpspge -lpspctrl

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = LTE GE Example - 2DGraphics

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
"psp-config --pspsdk-path" gives :

Code: Select all

/usr/local/pspdev/psp/sdk
and "$(PSPSDK)/lib/build.mak" is "/usr/local/pspdev/psp/sdk/lib/build.mak" and contains :

Code: Select all

# PSP Software Development Kit - http://www.pspdev.org
# -----------------------------------------------------------------------
# Licensed under the BSD license, see LICENSE in PSPSDK root for details.
#
# build.mak - Base makefile for projects using PSPSDK.
#
# Copyright &#40;c&#41; 2005 Marcus R. Brown <mrbrown@ocgnet.org>
# Copyright &#40;c&#41; 2005 James Forshaw <tyranid@gmail.com>
# Copyright &#40;c&#41; 2005 John Kelley <ps2dev@kelley.ca>
#
# $Id&#58; build.mak 2333 2007-10-31 19&#58;37&#58;40Z tyranid $

# Note&#58; The PSPSDK make variable must be defined before this file is included.
ifeq &#40;$&#40;PSPSDK&#41;,&#41;
$&#40;error $$&#40;PSPSDK&#41; is undefined.  Use "PSPSDK &#58;= $$&#40;shell psp-config --pspsdk-path&#41;" in your Makefile&#41;
endif

CC       = psp-gcc
CXX      = psp-g++
AS       = psp-gcc
LD       = psp-gcc
AR       = psp-ar
RANLIB   = psp-ranlib
STRIP    = psp-strip
MKSFO    = mksfo
PACK_PBP = pack-pbp
FIXUP    = psp-fixup-imports

# Add in PSPSDK includes and libraries.
INCDIR   &#58;= $&#40;INCDIR&#41; . $&#40;PSPSDK&#41;/include
LIBDIR   &#58;= $&#40;LIBDIR&#41; . $&#40;PSPSDK&#41;/lib

CFLAGS   &#58;= $&#40;addprefix -I,$&#40;INCDIR&#41;&#41; $&#40;CFLAGS&#41;
CXXFLAGS &#58;= $&#40;CFLAGS&#41; $&#40;CXXFLAGS&#41;
ASFLAGS  &#58;= $&#40;CFLAGS&#41; $&#40;ASFLAGS&#41;

ifeq &#40;$&#40;PSP_LARGE_MEMORY&#41;,1&#41;
MKSFO = mksfoex -d MEMSIZE=1
endif

ifeq &#40;$&#40;PSP_FW_VERSION&#41;,&#41;
PSP_FW_VERSION=150
endif

CFLAGS += -D_PSP_FW_VERSION=$&#40;PSP_FW_VERSION&#41;
CXXFLAGS += -D_PSP_FW_VERSION=$&#40;PSP_FW_VERSION&#41;

ifeq &#40;$&#40;BUILD_PRX&#41;,1&#41;
LDFLAGS  &#58;= $&#40;addprefix -L,$&#40;LIBDIR&#41;&#41; -specs=$&#40;PSPSDK&#41;/lib/prxspecs -Wl,-q,-T$&#40;PSPSDK&#41;/lib/linkfile.prx $&#40;LDFLAGS&#41;
EXTRA_CLEAN += $&#40;TARGET&#41;.elf
# Setup default exports if needed
ifdef PRX_EXPORTS
EXPORT_OBJ=$&#40;patsubst %.exp,%.o,$&#40;PRX_EXPORTS&#41;&#41;
EXTRA_CLEAN += $&#40;EXPORT_OBJ&#41;
else 
EXPORT_OBJ=$&#40;PSPSDK&#41;/lib/prxexports.o
endif
else
LDFLAGS  &#58;= $&#40;addprefix -L,$&#40;LIBDIR&#41;&#41; $&#40;LDFLAGS&#41;
endif

# Library selection.  By default we link with Newlib's libc.  Allow the
# user to link with PSPSDK's libc if USE_PSPSDK_LIBC is set to 1.

ifeq &#40;$&#40;USE_KERNEL_LIBC&#41;,1&#41;
# Use the PSP's kernel libc
PSPSDK_LIBC_LIB = 
CFLAGS &#58;= -I$&#40;PSPSDK&#41;/include/libc $&#40;CFLAGS&#41;
else
ifeq &#40;$&#40;USE_PSPSDK_LIBC&#41;,1&#41;
# Use the pspsdk libc
PSPSDK_LIBC_LIB = -lpsplibc
CFLAGS &#58;= -I$&#40;PSPSDK&#41;/include/libc $&#40;CFLAGS&#41;
else
# Use newlib &#40;urgh&#41;
PSPSDK_LIBC_LIB = -lc
endif
endif


# Link with following default libraries.  Other libraries should be specified in the $&#40;LIBS&#41; variable.
# TODO&#58; This library list needs to be generated at configure time.
#
ifeq &#40;$&#40;USE_KERNEL_LIBS&#41;,1&#41;
PSPSDK_LIBS = -lpspdebug -lpspdisplay_driver -lpspctrl_driver -lpspsdk
LIBS     &#58;= $&#40;LIBS&#41; $&#40;PSPSDK_LIBS&#41; $&#40;PSPSDK_LIBC_LIB&#41; -lpspkernel
else
ifeq &#40;$&#40;USE_USER_LIBS&#41;,1&#41;
PSPSDK_LIBS = -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk
LIBS     &#58;= $&#40;LIBS&#41; $&#40;PSPSDK_LIBS&#41; $&#40;PSPSDK_LIBC_LIB&#41; -lpspnet \
			-lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility \
			-lpspuser
else
PSPSDK_LIBS = -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk
LIBS     &#58;= $&#40;LIBS&#41; $&#40;PSPSDK_LIBS&#41; $&#40;PSPSDK_LIBC_LIB&#41; -lpspnet \
			-lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility \
			-lpspuser -lpspkernel
endif
endif

# Define the overridable parameters for EBOOT.PBP
ifndef PSP_EBOOT_TITLE
PSP_EBOOT_TITLE = $&#40;TARGET&#41;
endif

ifndef PSP_EBOOT_SFO
PSP_EBOOT_SFO = PARAM.SFO
endif

ifndef PSP_EBOOT_ICON
PSP_EBOOT_ICON = NULL
endif

ifndef PSP_EBOOT_ICON1
PSP_EBOOT_ICON1 = NULL
endif

ifndef PSP_EBOOT_UNKPNG
PSP_EBOOT_UNKPNG = NULL
endif

ifndef PSP_EBOOT_PIC1
PSP_EBOOT_PIC1 = NULL
endif

ifndef PSP_EBOOT_SND0
PSP_EBOOT_SND0 = NULL
endif

ifndef PSP_EBOOT_PSAR
PSP_EBOOT_PSAR = NULL
endif

ifndef PSP_EBOOT
PSP_EBOOT = EBOOT.PBP
endif

ifeq &#40;$&#40;BUILD_PRX&#41;,1&#41;
ifneq &#40;$&#40;TARGET_LIB&#41;,&#41;
$&#40;error TARGET_LIB should not be defined when building a prx&#41;
else
FINAL_TARGET = $&#40;TARGET&#41;.prx
endif
else
ifneq &#40;$&#40;TARGET_LIB&#41;,&#41;
FINAL_TARGET = $&#40;TARGET_LIB&#41;
else
FINAL_TARGET = $&#40;TARGET&#41;.elf
endif
endif

all&#58; $&#40;EXTRA_TARGETS&#41; $&#40;FINAL_TARGET&#41;

kxploit&#58; $&#40;TARGET&#41;.elf $&#40;PSP_EBOOT_SFO&#41;
	mkdir -p "$&#40;TARGET&#41;"
	$&#40;STRIP&#41; $&#40;TARGET&#41;.elf -o $&#40;TARGET&#41;/$&#40;PSP_EBOOT&#41;
	mkdir -p "$&#40;TARGET&#41;%"
	$&#40;PACK_PBP&#41; "$&#40;TARGET&#41;%/$&#40;PSP_EBOOT&#41;" $&#40;PSP_EBOOT_SFO&#41; $&#40;PSP_EBOOT_ICON&#41;  \
		$&#40;PSP_EBOOT_ICON1&#41; $&#40;PSP_EBOOT_UNKPNG&#41; $&#40;PSP_EBOOT_PIC1&#41;  \
		$&#40;PSP_EBOOT_SND0&#41; NULL $&#40;PSP_EBOOT_PSAR&#41;

SCEkxploit&#58; $&#40;TARGET&#41;.elf $&#40;PSP_EBOOT_SFO&#41;
	mkdir -p "__SCE__$&#40;TARGET&#41;"
	$&#40;STRIP&#41; $&#40;TARGET&#41;.elf -o __SCE__$&#40;TARGET&#41;/$&#40;PSP_EBOOT&#41;
	mkdir -p "%__SCE__$&#40;TARGET&#41;"
	$&#40;PACK_PBP&#41; "%__SCE__$&#40;TARGET&#41;/$&#40;PSP_EBOOT&#41;" $&#40;PSP_EBOOT_SFO&#41; $&#40;PSP_EBOOT_ICON&#41;  \
		$&#40;PSP_EBOOT_ICON1&#41; $&#40;PSP_EBOOT_UNKPNG&#41; $&#40;PSP_EBOOT_PIC1&#41;  \
		$&#40;PSP_EBOOT_SND0&#41; NULL $&#40;PSP_EBOOT_PSAR&#41;

$&#40;TARGET&#41;.elf&#58; $&#40;OBJS&#41; $&#40;EXPORT_OBJ&#41;
	$&#40;LINK.c&#41; $^ $&#40;LIBS&#41; -o $@
	$&#40;FIXUP&#41; $@

$&#40;TARGET_LIB&#41;&#58; $&#40;OBJS&#41;
	$&#40;AR&#41; cru $@ $&#40;OBJS&#41;
	$&#40;RANLIB&#41; $@

$&#40;PSP_EBOOT_SFO&#41;&#58; 
	$&#40;MKSFO&#41; '$&#40;PSP_EBOOT_TITLE&#41;' $@

ifeq &#40;$&#40;BUILD_PRX&#41;,1&#41;
$&#40;PSP_EBOOT&#41;&#58; $&#40;TARGET&#41;.prx $&#40;PSP_EBOOT_SFO&#41;
	$&#40;PACK_PBP&#41; $&#40;PSP_EBOOT&#41; $&#40;PSP_EBOOT_SFO&#41; $&#40;PSP_EBOOT_ICON&#41;  \
		$&#40;PSP_EBOOT_ICON1&#41; $&#40;PSP_EBOOT_UNKPNG&#41; $&#40;PSP_EBOOT_PIC1&#41;  \
		$&#40;PSP_EBOOT_SND0&#41;  $&#40;TARGET&#41;.prx $&#40;PSP_EBOOT_PSAR&#41;
else
$&#40;PSP_EBOOT&#41;&#58; $&#40;TARGET&#41;.elf $&#40;PSP_EBOOT_SFO&#41;
	$&#40;STRIP&#41; $&#40;TARGET&#41;.elf -o $&#40;TARGET&#41;_strip.elf
	$&#40;PACK_PBP&#41; $&#40;PSP_EBOOT&#41; $&#40;PSP_EBOOT_SFO&#41; $&#40;PSP_EBOOT_ICON&#41;  \
		$&#40;PSP_EBOOT_ICON1&#41; $&#40;PSP_EBOOT_UNKPNG&#41; $&#40;PSP_EBOOT_PIC1&#41;  \
		$&#40;PSP_EBOOT_SND0&#41;  $&#40;TARGET&#41;_strip.elf $&#40;PSP_EBOOT_PSAR&#41;
	-rm -f $&#40;TARGET&#41;_strip.elf
endif

%.prx&#58; %.elf
	psp-prxgen $< $@

%.c&#58; %.exp
	psp-build-exports -b $< > $@

clean&#58; 
	-rm -f $&#40;FINAL_TARGET&#41; $&#40;EXTRA_CLEAN&#41; $&#40;OBJS&#41; $&#40;PSP_EBOOT_SFO&#41; $&#40;PSP_EBOOT&#41; $&#40;EXTRA_TARGETS&#41;

rebuild&#58; clean all
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

You have -lm BEFORE -lode instead of after it. Remember, put dependencies AFTER the dependent library.
Snilmerg
Posts: 3
Joined: Thu Jan 29, 2009 12:49 am

Post by Snilmerg »

The solution is so simple. Thanks for solving this. Now that you say it I remember the importance of the dependencies order.

Thanks again.

Code: Select all

regis@Voyager &#91;05-09-09 12&#58;45&#58;23&#93; ~/Desktop/pspdev/lte-slim-beta-48/LTE/examples/06.2DGraphics $ make
psp-gcc -I../../include/ -I. -I/usr/local/pspdev/psp/sdk/include -G0  -O2 -D_PSP_FW_VERSION=390  -L../../libs -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx   main.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lengine -lpspwlan -lglut -lGLU -lGL -lpspvfpu -lstdc++ -lpsppower -lpsprtc -lpspaudio -lode -ldrawstuff -lpspdebug -lpspsdk -lc -lpsputility -lpspuser -lpspkernel -lpspdisplay -lpspge -lpspctrl -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o 2DGraphics.elf
psp-fixup-imports 2DGraphics.elf
psp-prxgen 2DGraphics.elf 2DGraphics.prx
mksfoex -d MEMSIZE=1 'LTE GE Example - 2DGraphics' PARAM.SFO
pack-pbp EBOOT.PBP PARAM.SFO NULL  \
		NULL NULL NULL  \
		NULL  2DGraphics.prx NULL
&#91;0&#93;        332 bytes | PARAM.SFO
&#91;1&#93;          0 bytes | NULL
&#91;2&#93;          0 bytes | NULL
&#91;3&#93;          0 bytes | NULL
&#91;4&#93;          0 bytes | NULL
&#91;5&#93;          0 bytes | NULL
&#91;6&#93;    3111798 bytes | 2DGraphics.prx
&#91;7&#93;          0 bytes | NULL
regis@Voyager &#91;05-09-09 12&#58;45&#58;29&#93; ~/Desktop/pspdev/lte-slim-beta-48/LTE/examples/06.2DGraphics $ 
Post Reply