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?
Mikmod troubles
-
- Posts: 197
- Joined: Fri Jul 01, 2005 2:50 am
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.
-
- Posts: 197
- Joined: Fri Jul 01, 2005 2:50 am
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:
Which refers to this
Any suggestions?
EDIT: Note, the errors are from within my own app which is based on the example source code.
This is my makefile:
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'
Code: Select all
extern UWORD md_mode;
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
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 !
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 !
-
- Posts: 197
- Joined: Fri Jul 01, 2005 2:50 am
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.
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.