Hi all,
I just compiled a program that runs fine on Win for Mac OS X 10.6.8, but when I try to run it its only a black screen for a second and then the program closes. How can I get the program working? I have already tried to CHMOD the MacOSX executable, but it is still the same error. Help!
Are you using the release version or trying the beta ? If it's the former, then see what message you get when the executable is run in Terminal.
Terminal says that the fmod.dll module is not found and that an fopen request for the hiscore.ini failed. Doesn't the compiler automatically include those files in the app?
DECLARE module not found: fmod.dll
request: fopen("hiscore.ini"), "rb") failed
I manually copied the necessary files to the Resources folder and now it is working but without sound... Is there a special way to include fmod.dll in OSX?
OK, correction: the fmod.dll is still not found although I put it in the correct folder together with the hiscore.ini (Resources). I also tried the folder where the Terminal says he's looking for it but it's still not found.
(PS - Maybe it's a compatibility issue between fmod.dll and OSX? I hope not, because the error message is about not finding the file.)
DLL files are Windows only so that could be the cause of your problem. Sadly I'm not 100% sure of the Mac equivalent :-[
Lee
Sent from my GT-I5700 using Tapatalk 2
It sounds like the fmod library is being found, but perhaps not the correct version (or at least not a compatible version). Are you using loading and using FMOD yourself, or is it part of GLBasic's requirements ?
I'm loading and using it myself. It's a very old version I think but the only one I could find around here. Code is as follows and I also attached the fmod.dll. Any kind of help is highly appreciated!
// --------------------------------- //
// Project: fmod player
// Start: Tuesday, May 09, 2006
// IDE Version: 3.118
INLINE
DECLARE_ALIAS(FMUSIC_LoadSong, "fmod.dll", "_FMUSIC_LoadSong@4", (const char* name), void*);
DECLARE_ALIAS(FMUSIC_PlaySong, "fmod.dll", "_FMUSIC_PlaySong@4", (void* pMod), char);
DECLARE_ALIAS(FMUSIC_FreeSong, "fmod.dll", "_FMUSIC_FreeSong@4", (void* pMod), char);
DECLARE_ALIAS(FSOUND_Init, "fmod.dll", "_FSOUND_Init@12", (int, int, unsigned int), char);
DECLARE_ALIAS(FSOUND_Close, "fmod.dll", "_FSOUND_Close@0", (void), void);
DECLARE_ALIAS(FMUSIC_IsFinished, "fmod.dll", "_FMUSIC_IsFinished@4", (void* pMod), char);
DECLARE_ALIAS(FMUSIC_SetMasterVolume, "fmod.dll", "_FMUSIC_SetMasterVolume@8", (void*, int), char);
void* g_pFMod = 0;
// need this for ESC-exits
struct FMOD_killer {~FMOD_killer() {if (g_pFMod) FMod_Stop();} } g_Fmod_killa;
ENDINLINE
GLOBAL fmod_init
FUNCTION FMod_Load: fname$
LOCAL good
IF fmod_init = FALSE
fmod_init=TRUE
ENDIF
FMod_Stop()
INLINE
if(FSOUND_Init) FSOUND_Init(44100,64,0);
if(FMUSIC_LoadSong)
g_pFMod = FMUSIC_LoadSong(fname_Str.c_str());
if(g_pFMod) good = true;
ENDINLINE
RETURN good
ENDFUNCTION
FUNCTION FMod_Play:
INLINE
if(FMUSIC_PlaySong && g_pFMod)
FMUSIC_PlaySong(g_pFMod);
ENDINLINE
ENDFUNCTION
FUNCTION FMod_Stop:
INLINE
if(FMUSIC_FreeSong && g_pFMod)
FMUSIC_FreeSong(g_pFMod);
g_pFMod = 0;
if(FSOUND_Close)
FSOUND_Close();
fmod_init=FALSE;
ENDINLINE
ENDFUNCTION
FUNCTION FMod_IsFinished:
INLINE
char ok=1;
if(FMUSIC_IsFinished && g_pFMod)
ok = FMUSIC_IsFinished(g_pFMod);
return ok ? TRUE : FALSE;
ENDINLINE
RETURN TRUE
ENDFUNCTION
FUNCTION FMod_SetMasterVolume: vol
INLINE
if(FMUSIC_SetMasterVolume && g_pFMod)
{
return FMUSIC_SetMasterVolume(g_pFMod, (int)(vol * 256.0)) ? TRUE:FALSE;
}
ENDINLINE
RETURN FALSE
ENDFUNCTION
[attachment deleted by admin]
http://stackoverflow.com/questions/4243191/dll-can-be-loaded-on-mac-os (http://stackoverflow.com/questions/4243191/dll-can-be-loaded-on-mac-os)
Like I said, you can't use DLL's on Mac OSX. Sorry
Lee
As stated, that is for Windows only. For the Mac version, you might want to look at this : http://www.glbasic.com/forum/index.php?topic=2678.msg19891#msg19891
You need to intefere with the mac version of fmod. The dll is win32 only.
Howover use the c++ interface for Mac version of it and here its would been to see code snippets of it.