| View previous topic :: View next topic |
| Author |
Message |
Diddl
Joined: 27 Mar 2007 Posts: 9
|
Posted: Fri Mar 30, 2007 3:48 am Post subject: linker error / samples |
|
|
please excuse my simple question, I'm a beginner in using psp toolchain ...
I have installed devkitpro on a Win XP (Ming) environment for NDS and PSP. the examples for NDS compile and execute fine. but this samples for PSP compiles but give errors while linking (many samples tested).
I think there is a lib file missing but which and why? could you help me? I don't have problems with C but with this Ming and Toolkit Environment.
| Code: | $ ls
Makefile main.c main.o
tw@TOMMY /D/Proj/PSP/samples/audio/polyphonic
$ make
psp-gcc -I. -I/d/Programme/devkitPro/devkitPSP/psp/sdk/include -O2 -G0 -Wall -D_
PSP_FW_VERSION=150 -L. -L/d/Programme/devkitPro/devkitPSP/psp/sdk/lib main.o
-lpspaudiolib -lpspaudio -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc
-lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -
lpspkernel -o polyphonic.elf
main.o: In function `main':
main.c:(.text+0x558): undefined reference to `pspDebugScreenInit'
main.c:(.text+0x56c): undefined reference to `pspDebugScreenPrintf'
main.c:(.text+0x578): undefined reference to `pspDebugScreenPrintf'
main.c:(.text+0x584): undefined reference to `pspDebugScreenPrintf'
main.c:(.text+0x590): undefined reference to `pspDebugScreenPrintf'
collect2: ld returned 1 exit status
make: *** [polyphonic.elf] Error 1
tw@TOMMY /D/Proj/PSP/samples/audio/polyphonic
$ |
|
|
| Back to top |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Fri Mar 30, 2007 5:18 am Post subject: |
|
|
//link pspdebug with
LDFLAGS += -lpspdebug
//and check your include of
#include <pspdebug.h> _________________ 10011011 00101010 11010111 10001001 10111010 |
|
| Back to top |
|
 |
Diddl
Joined: 27 Mar 2007 Posts: 9
|
Posted: Fri Mar 30, 2007 7:28 am Post subject: |
|
|
thanks for answer.
libfile libpspdebug.a is in folder /d/Programme/devkitPro/devkitPSP/psp/sdk/lib and make utility already uses -L/d/Programme/devkitPro/devkitPSP/psp/sdk/lib and -lpspdebug
so I don't understand why linker won't bind this lib and resolve this externals? |
|
| Back to top |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Fri Mar 30, 2007 9:23 am Post subject: |
|
|
// well check that your path is pointing to this
/d/Programme/devkitPro/devkitPSP/psp/sdk/lib
right click My Computer->Properties, Advanced TAB->Enviroment Variables
on the bottom of window that pops up you should see System Variables
scroll window to where you see Path for Variable, now click EDIT button
then add ; after last directory then paste
/d/Programme/devkitPro/devkitPSP/psp/sdk/lib;
// and
/d/Programme/devkitPro/devkitPSP/psp/sdk/include;
it should be something similar to like C:\DEVKITPRO\DEVKITPSP\psp\sdk\lib
and C:\DEVKITPRO\DEVKITPSP\psp\sdk\include;
i dont use devkitpsp so wouldnt know but it should be something very similar
to this _________________ 10011011 00101010 11010111 10001001 10111010 |
|
| Back to top |
|
 |
PeterM
Joined: 31 Dec 2005 Posts: 125 Location: Edinburgh, UK
|
Posted: Thu Apr 12, 2007 9:23 am Post subject: |
|
|
Hi,
Have you had any luck with this? I tried switching to devkitPSP too, but ran into the same problem. My path and all that is fine, it's finding the libraries, they just don't seem to have the functions in them.
Looks like the supplied PSPSDK is old, but I'd like to verify that.
Pete _________________ http://aaiiee.wordpress.com/
I can no longer do any homebrew PSP development nor discuss PSP specific topics. |
|
| Back to top |
|
 |
Diddl
Joined: 27 Mar 2007 Posts: 9
|
Posted: Fri Apr 13, 2007 6:48 pm Post subject: |
|
|
| PeterM wrote: | Hi,
Looks like the supplied PSPSDK is old, but I'd like to verify that. |
cannot believe it is old. I'm using newest available (v10). and the point is, this example files are included with the kit!
you switch to devkitPSP? which one you use normally? is there a alternative kit available? does this run under windows? |
|
| Back to top |
|
 |
PeterM
Joined: 31 Dec 2005 Posts: 125 Location: Edinburgh, UK
|
Posted: Fri Apr 13, 2007 7:52 pm Post subject: |
|
|
I had a chat with WinterMute, the guy that does devkitPSP. He reckons there's a problem with r10's PSPSDK, which causes the linking errors, and recommends using r9.
R9 worked much fine for the sample apps, but we got sound corruption in Quake. Probably something we're doing rather than a problem in the toolchain, but I couldn't track it down.
He says he's doing a new release soon.
I was using the precompiled setup from http://xorloser.com , but the SDK is from Dec 2006 and is a bit out of date.
In the end I installed cygwin again and updated to the latest PSPSDK from SVN. _________________ http://aaiiee.wordpress.com/
I can no longer do any homebrew PSP development nor discuss PSP specific topics. |
|
| Back to top |
|
 |
WinterMute
Joined: 05 Jul 2005 Posts: 9 Location: UK
|
Posted: Mon Apr 23, 2007 12:07 am Post subject: |
|
|
For what it's worth release 11 is now available and gets rid of the linking errors.
I should really check the forums here more often :P |
|
| Back to top |
|
 |
Diddl
Joined: 27 Mar 2007 Posts: 9
|
Posted: Mon Apr 30, 2007 11:44 pm Post subject: |
|
|
oh thanks for answers! I was in holidays and so I don't see your answers since yesterday.
I will test release 11 today ... |
|
| Back to top |
|
 |
Diddl
Joined: 27 Mar 2007 Posts: 9
|
Posted: Sun May 06, 2007 7:47 am Post subject: |
|
|
| WinterMute wrote: | For what it's worth release 11 is now available and gets rid of the linking errors.
I should really check the forums here more often :P |
many thanks to wintermute, r11 works fine for me!! |
|
| Back to top |
|
 |
|