Mikmod troubles

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

Moderators: cheriff, TyRaNiD

Post Reply
AnonymousTipster
Posts: 197
Joined: Fri Jul 01, 2005 2:50 am

Mikmod troubles

Post by AnonymousTipster »

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?
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

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
AnonymousTipster
Posts: 197
Joined: Fri Jul 01, 2005 2:50 am

Post by AnonymousTipster »

I'm using the first link on http://forums.ps2dev.org/viewtopic.php? ... ght=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.
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

That stuff's too old to build with the latest sdk. Get the one from SVN.

Jim
AnonymousTipster
Posts: 197
Joined: Fri Jul 01, 2005 2:50 am

Post by AnonymousTipster »

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: Select all

relocation truncated to fit: R_MIPS_GPREL16 against 'md_mode'
Which refers to this

Code: Select all

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: Select all

^^ 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
patpsp
Posts: 31
Joined: Tue Oct 25, 2005 5:24 pm

Post by patpsp »

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 !
AnonymousTipster
Posts: 197
Joined: Fri Jul 01, 2005 2:50 am

Post by AnonymousTipster »

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.
Post Reply