forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mikmod troubles

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
AnonymousTipster



Joined: 01 Jul 2005
Posts: 197

PostPosted: Tue Nov 08, 2005 5:59 am    Post subject: Mikmod troubles Reply with quote

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
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Tue Nov 08, 2005 7:08 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
AnonymousTipster



Joined: 01 Jul 2005
Posts: 197

PostPosted: Tue Nov 08, 2005 7:28 am    Post subject: Reply with quote

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
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Tue Nov 08, 2005 10:52 pm    Post subject: Reply with quote

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

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
AnonymousTipster



Joined: 01 Jul 2005
Posts: 197

PostPosted: Wed Nov 09, 2005 6:27 am    Post subject: Reply with quote

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
View user's profile Send private message
patpsp



Joined: 25 Oct 2005
Posts: 31

PostPosted: Wed Nov 09, 2005 6:32 am    Post subject: Reply with quote

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
View user's profile Send private message
AnonymousTipster



Joined: 01 Jul 2005
Posts: 197

PostPosted: Wed Nov 09, 2005 6:57 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group