libmikmod

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

Moderators: cheriff, TyRaNiD

Post Reply
Xephonic
Posts: 6
Joined: Wed Aug 03, 2005 8:18 am

libmikmod

Post by Xephonic »

#include <pspkernel.h>
#include <pspiofilemgr_fcntl.h>
#include <string.h>
#include <pspaudio.h>
#include <pspaudiolib.h>

#include "mikmod.h"

#define BACKGROUND_MUSIC_FILE "ms0:/PSP/GAME/PSPCHESS/BACKGROUND.MOD"
#define MUSIC_DIR "ms0:/PSP/MUSIC"

#define MAX_ENTRY 512

UNIMOD *g_mf;


int g_music_on = 1;

#define O_RDONLY 0x0001



syntax error before '*' token on unimod line

why does it do this?
sweetlilmre
Posts: 27
Joined: Sat Oct 01, 2005 7:24 pm

Post by sweetlilmre »

If you are using the new libmikmod import, then UNIMOD is no longer applicable. It is now MODULE.

I have made some updates to the lib, so get the latest version and look at the example.c.

-(e)
Xephonic
Posts: 6
Joined: Wed Aug 03, 2005 8:18 am

Post by Xephonic »

sweetlilmre wrote:If you are using the new libmikmod import, then UNIMOD is no longer applicable. It is now MODULE.

I have made some updates to the lib, so get the latest version and look at the example.c.

-(e)
When i try to compile example.c

i get these errors now:
relocation truncated to fit: R_MIPS_GREPL16 against "md_mode"
relocation truncated to fit: R_MIPS_GREPL16 against "md_reverb"
relocation truncated to fit: R_MIPS_GREPL16 against "md_pansep"
sweetlilmre
Posts: 27
Joined: Sat Oct 01, 2005 7:24 pm

Post by sweetlilmre »

Weird,

If you have done: svn co svn://svn.ps2dev.org/psp/trunk/libmikmod
Then "make -f Makefile.psp clean install"
You should see a -G0 as a compile option. This should prevent the relocation errors. Perhaps you should try compiling your code with -G0?

I'm fairly new to the gcc world so I could be talking crap here.

Make sure you removed any previous mikmod lib files (libmikmod.a and mmio.a) as well as the header from the PSP lib and include dirs.

-(e)
Post Reply