| View previous topic :: View next topic |
| Author |
Message |
AnonymousTipster
Joined: 01 Jul 2005 Posts: 197
|
Posted: Tue Nov 08, 2005 5:59 am Post subject: Mikmod troubles |
|
|
I'm having a problem integrating the mikmod library into a project of mine.
I've compiled the libmikmod.A and libmmio.A which both reside in mikmod/lib. When I try to make the usercode files, I get 'cannot find -lmikmod' error.
When using the library in my own code, I get 'undefined reference to pspAudioInit' (and several other similar ones).
This should be really simple, but something has gone wrong, any suggestions? |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Tue Nov 08, 2005 7:08 am Post subject: |
|
|
If you're using the SVN version, type
make
make install
to build the libs and put them where the linker can find them.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
AnonymousTipster
Joined: 01 Jul 2005 Posts: 197
|
Posted: Tue Nov 08, 2005 7:28 am Post subject: |
|
|
| I'm using the first link on http://forums.ps2dev.org/viewtopic.php?t=2540&highlight=mikmod . I tried make install in the main directory, usercode and playercode. None worked. I've got the libraries in the usr\local\pspdev\psp\sdk\lib, and my application can find them, but comes up with pspAudio.. not found errors. That's my main concern, I was quoting the usercode errors to see if there was something wrong with the library. |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Tue Nov 08, 2005 10:52 pm Post subject: |
|
|
That stuff's too old to build with the latest sdk. Get the one from SVN.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
AnonymousTipster
Joined: 01 Jul 2005 Posts: 197
|
Posted: Wed Nov 09, 2005 6:27 am Post subject: |
|
|
Ok, I've updated my psptoolchain and PSPSDK installation and downloaded the mikmodlib from SVN. I've made the libraries and installed them in the directories. Fine.
I've got most of the errors, but i'm still getting this error:
| Code: | | relocation truncated to fit: R_MIPS_GPREL16 against 'md_mode' |
Which refers to this | Code: | | extern UWORD md_mode; |
Any suggestions?
EDIT: Note, the errors are from within my own app which is based on the example source code.
This is my makefile:
| Code: |
^^ OBJS above here^^
CFLAGS = -O2 -G8 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
LIBS= -lstdc++ -lpspgum -lpspgu -lm -lmikmod -lmmio -lpspaudiolib -lpspaudio
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = ThrottleX
PSP_EBOOT_ICON = "ThrottleXLogo.png"
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
|
|
|
| Back to top |
|
 |
patpsp
Joined: 25 Oct 2005 Posts: 31
|
Posted: Wed Nov 09, 2005 6:32 am Post subject: |
|
|
I had exactly the same problem, but i didn't have answers here.
I searched a lot, and I made a lot of tests to find that you have to define the
PSP_MODULE_INFO("NAME", 0, 1, 1);
at the beginning of your program (just after the declaration like #include or #define), and not to define the module name in the Makefile
You can also try that change in your Makefile :
CFLAGS = -O2 -G0 -Wall
Hope it can help you ! |
|
| Back to top |
|
 |
AnonymousTipster
Joined: 01 Jul 2005 Posts: 197
|
Posted: Wed Nov 09, 2005 6:57 am Post subject: |
|
|
I had already set the MODULE_INFO correctly, but changing -G8 to -G0 seems to do the trick. This is odd because I was told -G8 was the more reliable one. Oh well, at least it works now.
Problem is that by updating the SDK, it has now just completely soiled the rest of my program. Looks like it's time for a new thread. |
|
| Back to top |
|
 |
|