0
0

Greetings,

Using the search feature on this forum didn’t yeild any obvious answers, but I will happily stand corrected as a generally oblivious person.

Using the FMOD 4.06.22, a project group of which I am a part has had difficulty including the .dylib’s into XCode.

They can be placed in the project fine, and the project builds fine, but upon attempting to run it, we get the following error:
dyld: Library not loaded: /usr/local/lib/*.dylib
Referenced from: /Users/…etc. etc… /<application executablename>
Reason: image not found

Where *.dylib is whichever of the dylibs it first decides to encounter.

Upon running ‘otool -L’ on the executable, we noticed that despite adding all the dylibs to the project, the references all pointed to /usr/local/lib/. Upon running ‘otool -L’ on any of the dylibs, we discovered that these were also all pointing to /usr/local/lib/.

There exists a somewhat useful tool to change the location of dylibs for binary files, but not that I can find for existing dylibs. As such our inconvenient ‘work around’ is to run a script at the end of every build that does the following on all the fmod dylibs:

install_name_tool -change /usr/local/lib/libfmodex.dylib @executable_path/../Frameworks/libfmodex.dylib <name of executable>

This is incredibly inconvenient, and at present I’m trying to find a better solution, ideally changing the dylibs own statically stored path to themselves to be something more useful (if that is in fact what is the root of the problem). I opened the XCode examples, to find they compiled and ran… from XCode. Trying to run example app outside of XCode resulted in the same error. I then attempted the Makefile also provided with all the examples, but only to be faced with the same problem. It is however from the makefile that I devised the temporary solution using install_name_tool script. It may be worth considering that the use of install_name_tool in the makefile didn’t actually run, as for instance with the ‘effects’, it has the following line:

install_name_tool -change libfmodex.dylib @executable_path/libfmodex.dylib effects

But when doing an ‘otool -L’ on the executable ‘effects’ both before and afterwards I get the same output, ie:
/usr/local/lib/libfmodex.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.9)

Modifying the install_name_tool command to the following:
install_name_tool -change /usr/local/lib/libfmodex.dylib @executable_path/libfmodex.dylib effects

results in ‘otool -L effects’ updating to:
@executable_path/libfmodex.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.9)

Which I believe is the desired output.

I would easily believe this to be an OSX only problem, but nevertheless it has been causing me a rather big headache so far, and I’m open to any suggestion or assistance (not to mention a hint as to why XCode can build+run fine, but if you try and run the executable outside of XCode it fails with the same original error).

Note – This is on an intel OSX machine, running 10.4.10, and has only been tested (and confirmed to have the same issue) on other 10.4.10 machines (intel and PPC).

Also note – That copying all the dylibs to /usr/local/lib resolves the problem, but is not feasible as access to all our machines for work have different privelages (and thus some we cannot copy to /usr/local/lib), and a release would need to be self contained.

Apologies for the first post being a long one, but I’m trying to get as much info as I think might help lead to a solution of this problem.

  • You must to post comments
0
0

[quote="California27":rwmaqso1]Hey guys, I have read through this thread and another one a few times and I cannot understand how this problem is "SOLVED".
From what I understand, you need to use the install name tool command.
[/quote:rwmaqso1]

Yes, you still need install_name_tool. Its pretty much a fact of life of Mac development, that you will need to use install_name_tool. This problem isn’t unique to FMOD.

[quote="California27":rwmaqso1]However, being a Mac programming newbie, I really dont understand the correct usage of this command. How do I apply it to a compiled .app bundle that I have produced with Xcode.[/quote:rwmaqso1]

I don’t use Xcode, so the best answer I have for you is "it depends on where Xcode puts libfmodex.dylib relative to your main program". Where "main program" refers to the executable in Contents/MacOS directory in the bundle, and not the folder with the .app extension that is the root of your bundle.

What you need to do is use install_name_tool to change the id of fmod (using install_name_tool -id) and all binaries that reference it (using install_name_tool -change) to point to where fmod really is. For example, if you put fmod in the same directory as your main executable, you would use:

@executable_path/libfmodex.dylib

if, instead, you put it in a Libraries folder in your bundle, you would use:

@executable_path/../Libraries/libfmodex.dylib

and so on. Does that help?

  • You must to post comments
0
0

Your app doesn’t compile out of the box, there were a lot of issues with Qt. I tried running the app that was already compiled and there was a dynamic link error with Qt also. When you create an .app file you need to bundle the relevant Qt frameworks inside the app bundle or use staticly linked versions.

I’m going to give you some steps to follow though that should resolve your FMOD issue.

You need to put the FMOD dylib in the app bundle first, for instance, in test.app/Contents/Libraries/libfmodex.dylib.

Now you need to tell your executable where to find that library at runtime. You can run ‘otool -L test.app/Contents/MacOS/test’ to see where the app is currently looking for each dylib (it will be looking for fmod at ./libfmodex.dylib).

To change that you use ‘install_name_tool -change ./libfmodex.dylib @executable_path/../Libraries/libfmodex.dylib test.app/Contents/MacOS/test’.

That should be all you need to do (you can verify the new path with otool). You can easily add these steps as a post build operation in your Xcode project.

If you have any more questions let me know.

  • You must to post comments
0
0

Sorry to keep replying rather than modifying the above post, however this is not an edit of what I said before but rather something new:

Running ‘otool -L’ on all the dylibs (w/ ‘head -n 2’ for each of them), has shown some interesting results (as shown below).

Could I make the request that possibly the OSX builds be available as universal binaries (quite easy using the lipo command), and then possibly put together in a Framework?

  • You must to post comments
0
0

@ssexton
Thank you very much for your swift reply ssexton, as well as everyone else’s help. After reading your post and everyone else’s a couple of times I figured it out.

A combination of running:

otool -L /path/to/AppName.app/Contents/MacOS/AppName

And creating a run script for Xcode:

mkdir "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks"
cp -f /Developer/FMOD Programmers API/api/lib/libfmodex.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/libfmodex.dylib"

install_name_tool -change ./libfmodexp.dylib @loader_path/../Frameworks/libfmodex.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME"

I also made a much more comprehensive guide to let other people who may not be as clever as us know how to do this. At the bottom of the article you can download a copy as either a Pages or PDF document.

Here: http://brockwoolf.com/how-to-use-dynami … using-fmod

Tell me if you liked it. Thanks

Brock

  • You must to post comments
0
0

ok thanks a lot. I will try again with the explanation you told me
:)

  • You must to post comments
0
0

[code:1suw1y9f]
libfmodex.dylib
/usr/local/lib/libfmodex.dylib (compatibility version 1.0.0, current version 1.0.0)
libfmodexp.dylib
/usr/local/lib/libfmodexp.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_aiff.dylib
/usr/local/lib/codec_aiff.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_cdda.dylib
/usr/local/lib/codec_cdda.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_dls.dylib
/usr/local/lib/codec_dls.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_flac.dylib
/usr/local/lib/codec_flac.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_fsb.dylib
/usr/local/lib/codec_fsb.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_it.dylib
/usr/local/lib/codec_it.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_midi.dylib
/usr/local/lib/codec_midi.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_mod.dylib
/usr/local/lib/codec_mod.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_mpeg.dylib
/usr/local/lib/codec_mpeg.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_oggvorbis.dylib
/usr/local/lib/codec_oggvorbis.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_playlist.dylib
/usr/local/lib/codec_playlist.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_raw.dylib
/usr/local/lib/codec_raw.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_s3m.dylib
/usr/local/lib/codec_s3m.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_sf2.dylib
/usr/local/lib/codec_sf2.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_tag.dylib
/usr/local/lib/codec_tag.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_wav.dylib
/usr/local/lib/codec_wav.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_xm.dylib
/usr/local/lib/codec_xm.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_chorus.dylib
/usr/local/lib/dsp_chorus.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_distortion.dylib
/usr/local/lib/dsp_distortion.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_echo.dylib
/usr/local/lib/dsp_echo.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_flange.dylib
/usr/local/lib/dsp_flange.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_highpass.dylib
/usr/local/lib/dsp_highpass.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_itecho.dylib
/usr/local/lib/dsp_itecho.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_lowpass.dylib
/usr/local/lib/dsp_lowpass.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_lowpass2.dylib
/usr/local/lib/dsp_lowpass2.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_normalize.dylib
/usr/local/lib/dsp_normalize.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_oscillator.dylib
/usr/local/lib/dsp_oscillator.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_parameq.dylib
/usr/local/lib/dsp_parameq.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_pitchshift.dylib
/usr/local/lib/dsp_pitchshift.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_reverb.dylib
/usr/local/lib/dsp_reverb.dylib (compatibility version 1.0.0, current version 1.0.0)
output_coreaudio.dylib
/usr/local/lib/output_coreaudio.dylib (compatibility version 1.0.0, current version 1.0.0)
output_nosound_nrt.dylib
/usr/local/lib/output_nosound_nrt.dylib (compatibility version 1.0.0, current version 1.0.0)
output_nosound.dylib
/usr/local/lib/output_nosound.dylib (compatibility version 1.0.0, current version 1.0.0)
output_soundmanager.dylib
/usr/local/lib/output_soundmanager.dylib (compatibility version 1.0.0, current version 1.0.0)
output_wavwriter_nrt.dylib
/usr/local/lib/output_wavwriter_nrt.dylib (compatibility version 1.0.0, current version 1.0.0)
output_wavwriter.dylib
/usr/local/lib/output_wavwriter.dylib (compatibility version 1.0.0, current version 1.0.0)[/code:1suw1y9f]

  • You must to post comments
0
0

Brock, a couple of comments:

  1. A Framework is different than a Library. A standalone .dylib should go in Libraries directory, not Frameworks directory. Putting it next to the main executable is also common. That’s the convention, anyway.

Like a .app, a .framework is another bundle structure, more than I want to get into here – ADC has some good info, and you can take a look /System/Library/Frameworks for some examples. OpenAL.framework in particular reflects what you should probably do to use FMOD as a framework. At a minimum, you would change your script to:

  • create directory Contents/MacOS/Frameworks/FMOD.framework/Versions/A
  • cp libfmodex.dylib Contents/MacOS/Frameworks/FMOD.framework/Versions/A/FMOD
  • create a ‘Current’ symlink within FMOD.framework (see OpenAL.framework for an example)
  • create a ‘FMOD’ symlink within FMOD.framework (ditto)

Note that in doing this, you are renaming libfmodex.dylib to FMOD (without any file extension). Also, that the renamed FMOD library is named s.t. it matches the bundle directory (FMOD.framework) that contains it.

  1. I’d be surprised if XCode doesn’t have an option to "embed frameworks into application bundle", that would do the same thing your script does. I could’ve sworn I’ve seen one, but, I don’t spend much time with XCode. Might be worth looking around a bit for it.

Regards,
Steve

  • You must to post comments
0
0

I forgot to reply but it works now with your indication! I didn’t understand one thing : @executable_path is not the .app but inside Contents/MacOS/ directory… That’s why I was confused.

Don’t ask me why I thought a such thing, I don’t know myself!

Anyway, thanks a lot.

  • You must to post comments
0
0

[code:3p97i3me]
libfmodex.dylib
libfmodex.dylib (compatibility version 0.0.0, current version 0.0.0)
libfmodexp.dylib
libfmodexp.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_aiff.dylib
version/api/plugins/codec_aiff.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_cdda.dylib
version/api/plugins/codec_cdda.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_dls.dylib
version/api/plugins/codec_dls.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_flac.dylib
version/api/plugins/codec_flac.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_fsb.dylib
version/api/plugins/codec_fsb.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_it.dylib
version/api/plugins/codec_it.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_midi.dylib
version/api/plugins/codec_midi.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_mod.dylib
version/api/plugins/codec_mod.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_mpeg.dylib
version/api/plugins/codec_mpeg.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_oggvorbis.dylib
version/api/plugins/codec_oggvorbis.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_playlist.dylib
version/api/plugins/codec_playlist.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_raw.dylib
version/api/plugins/codec_raw.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_s3m.dylib
version/api/plugins/codec_s3m.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_sf2.dylib
version/api/plugins/codec_sf2.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_tag.dylib
version/api/plugins/codec_tag.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_wav.dylib
version/api/plugins/codec_wav.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_xm.dylib
version/api/plugins/codec_xm.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_chorus.dylib
version/api/plugins/dsp_chorus.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_distortion.dylib
version/api/plugins/dsp_distortion.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_echo.dylib
version/api/plugins/dsp_echo.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_flange.dylib
version/api/plugins/dsp_flange.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_highpass.dylib
version/api/plugins/dsp_highpass.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_itecho.dylib
version/api/plugins/dsp_itecho.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_lowpass_simple.dylib
version/api/plugins/dsp_lowpass_simple.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_lowpass.dylib
version/api/plugins/dsp_lowpass.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_lowpass2.dylib
version/api/plugins/dsp_lowpass2.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_normalize.dylib
version/api/plugins/dsp_normalize.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_oscillator.dylib
version/api/plugins/dsp_oscillator.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_parameq.dylib
version/api/plugins/dsp_parameq.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_pitchshift.dylib
version/api/plugins/dsp_pitchshift.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_reverb.dylib
version/api/plugins/dsp_reverb.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_sfxreverb.dylib
version/api/plugins/dsp_sfxreverb.dylib (compatibility version 0.0.0, current version 0.0.0)
output_coreaudio.dylib
version/api/plugins/output_coreaudio.dylib (compatibility version 0.0.0, current version 0.0.0)
output_nosound_nrt.dylib
version/api/plugins/output_nosound_nrt.dylib (compatibility version 0.0.0, current version 0.0.0)
output_nosound.dylib
version/api/plugins/output_nosound.dylib (compatibility version 0.0.0, current version 0.0.0)
output_soundmanager.dylib
version/api/plugins/output_soundmanager.dylib (compatibility version 0.0.0, current version 0.0.0)
output_wavwriter_nrt.dylib
version/api/plugins/output_wavwriter_nrt.dylib (compatibility version 0.0.0, current version 0.0.0)
output_wavwriter.dylib
version/api/plugins/output_wavwriter.dylib (compatibility version 0.0.0, current version 0.0.0)[/code:3p97i3me]

  • You must to post comments
0
0

Hmmm some very good ideas there. I will have to explore your comments more. I do agree with you about maybe not putting them in /Frameworks.
I might do what you said and put them next to the executable inside the bundle.

It’s been quite difficult finding sample code or even how to do this since Apple’s developer documentation is fairly skint and they don’t have a knowledge base like Microsoft do (and they need it!) but it would be nice if Apple actually updated their dev docs once in a while.

But anyway it is a unix based system and any Linux coder would have to put up with worse than this so I should be happy :)

Thanks fpr your help ssexton!

  • You must to post comments
0
0

[code:1nx1dksq]libfmodex.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release/libfmodex.dylib (compatibility version 1.0.0, current version 1.0.0)
libfmodexp.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/libfmodexp.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_aiff.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_aiff.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_cdda.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_cdda.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_dls.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_dls.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_flac.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_flac.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_fsb.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_fsb.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_it.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_it.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_midi.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_midi.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_mod.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_mod.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_mpeg.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_mpeg.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_oggvorbis.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_oggvorbis.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_playlist.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_playlist.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_raw.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_raw.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_s3m.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_s3m.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_sf2.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_sf2.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_tag.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_tag.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_wav.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_wav.dylib (compatibility version 1.0.0, current version 1.0.0)
codec_xm.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/codec_xm.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_chorus.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_chorus.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_distortion.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_distortion.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_echo.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_echo.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_flange.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_flange.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_highpass.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_highpass.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_itecho.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_itecho.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_lowpass.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_lowpass.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_lowpass2.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_lowpass2.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_normalize.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_normalize.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_oscillator.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_oscillator.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_parameq.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_parameq.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_pitchshift.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_pitchshift.dylib (compatibility version 1.0.0, current version 1.0.0)
dsp_reverb.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/dsp_reverb.dylib (compatibility version 1.0.0, current version 1.0.0)
output_coreaudio.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/output_coreaudio.dylib (compatibility version 1.0.0, current version 1.0.0)
output_nosound_nrt.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/output_nosound_nrt.dylib (compatibility version 1.0.0, current version 1.0.0)
output_nosound.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/output_nosound.dylib (compatibility version 1.0.0, current version 1.0.0)
output_soundmanager.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/output_soundmanager.dylib (compatibility version 1.0.0, current version 1.0.0)
output_wavwriter_nrt.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/output_wavwriter_nrt.dylib (compatibility version 1.0.0, current version 1.0.0)
output_wavwriter.dylib
/Users/Mathew/Desktop/sound/fmod4/mac/build/Release_Plugins/output_wavwriter.dylib (compatibility version 1.0.0, current version 1.0.0)[/code:1nx1dksq]

  • You must to post comments
0
0

hello guys!
I’ve got some trouble with this dylib thing. My code worked great with XCode+Qt+FmodEx within Xcode but crash when .app was launched.

So I tried the brockwoolf method, but it doesn’t work in xCode or with .app anymore…

Can you help me? Thanks!

  • You must to post comments
0
0

[code:1vla920d]
libfmodex.dylib
libfmodex.dylib (compatibility version 0.0.0, current version 0.0.0)
libfmodexp.dylib
libfmodexp.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_aiff.dylib
version/api/plugins/codec_aiff.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_cdda.dylib
version/api/plugins/codec_cdda.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_dls.dylib
version/api/plugins/codec_dls.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_flac.dylib
version/api/plugins/codec_flac.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_fsb.dylib
version/api/plugins/codec_fsb.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_it.dylib
version/api/plugins/codec_it.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_midi.dylib
version/api/plugins/codec_midi.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_mod.dylib
version/api/plugins/codec_mod.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_mpeg.dylib
version/api/plugins/codec_mpeg.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_oggvorbis.dylib
version/api/plugins/codec_oggvorbis.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_playlist.dylib
version/api/plugins/codec_playlist.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_raw.dylib
version/api/plugins/codec_raw.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_s3m.dylib
version/api/plugins/codec_s3m.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_sf2.dylib
version/api/plugins/codec_sf2.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_tag.dylib
version/api/plugins/codec_tag.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_wav.dylib
version/api/plugins/codec_wav.dylib (compatibility version 0.0.0, current version 0.0.0)
codec_xm.dylib
version/api/plugins/codec_xm.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_chorus.dylib
version/api/plugins/dsp_chorus.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_distortion.dylib
version/api/plugins/dsp_distortion.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_echo.dylib
version/api/plugins/dsp_echo.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_flange.dylib
version/api/plugins/dsp_flange.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_highpass.dylib
version/api/plugins/dsp_highpass.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_itecho.dylib
version/api/plugins/dsp_itecho.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_lowpass_simple.dylib
version/api/plugins/dsp_lowpass_simple.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_lowpass.dylib
version/api/plugins/dsp_lowpass.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_lowpass2.dylib
version/api/plugins/dsp_lowpass2.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_normalize.dylib
version/api/plugins/dsp_normalize.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_oscillator.dylib
version/api/plugins/dsp_oscillator.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_parameq.dylib
version/api/plugins/dsp_parameq.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_pitchshift.dylib
version/api/plugins/dsp_pitchshift.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_reverb.dylib
version/api/plugins/dsp_reverb.dylib (compatibility version 0.0.0, current version 0.0.0)
dsp_sfxreverb.dylib
version/api/plugins/dsp_sfxreverb.dylib (compatibility version 0.0.0, current version 0.0.0)
output_coreaudio.dylib
version/api/plugins/output_coreaudio.dylib (compatibility version 0.0.0, current version 0.0.0)
output_nosound_nrt.dylib
version/api/plugins/output_nosound_nrt.dylib (compatibility version 0.0.0, current version 0.0.0)
output_nosound.dylib
version/api/plugins/output_nosound.dylib (compatibility version 0.0.0, current version 0.0.0)
output_soundmanager.dylib
version/api/plugins/output_soundmanager.dylib (compatibility version 0.0.0, current version 0.0.0)
output_wavwriter_nrt.dylib
version/api/plugins/output_wavwriter_nrt.dylib (compatibility version 0.0.0, current version 0.0.0)
output_wavwriter.dylib
version/api/plugins/output_wavwriter.dylib (compatibility version 0.0.0, current version 0.0.0)[/code:1vla920d]

  • You must to post comments
0
0

I suggest you look at the examples, we have xcode projects for each one.

  • You must to post comments
0
0

Good news. It appears there is functionality of the install_name_tool that I missed earlier.

if I go:
install_name_tool -id @executable_path/../Frameworks/<dylibname>.dylib <dylibname>.dylib

Then it updates their own local references to themselves that is used when compiled into a .app. It is still an issue as to what the defaults should be (I imagine just ‘itself’, or something similar to the above, as copying the dylibs to the .app/Conents/Frameworks/ is quite simple, given that’s where most of your headers and other frameworks go anyway.

Neverthless, hopefully this can act as a reference for anyone else who stumbles into the same trap.

  • You must to post comments
0
0

yes but as explain in previous post, the app launched by xCode work but not the app int he finder.

  • You must to post comments
0
0

Thanks for the research we’ll look at putting this in our mac specific tutorial section of the docs.

  • You must to post comments
0
0

The example apps produced by the makefile and by the Xcode project are designed to be run from the command line terminal, not the finder. They are not graphical applications.

When you run something from the finder it uses an absolute path to the executable you clicked on, therefore there is no working directory. In this case the executable can’t resolve the dylib as it is referenced as "./libfmodex.dylib" (as seen via otool -L). This is done as a convienience since the code internally uses relative paths for media.

You can however change the reference using install_name_tool to use the exectuable path (@executable_path) but you would need to include full paths for the media in the code also for it to work in the finder.

For it to work as it stands simply open a terminal window and navigate to the example directory and run the examples that way. In a proper app you would have the dylib inside the app bundle and setup the referencing correct for that of course.

  • You must to post comments
0
0

As a long-time Mac programmer (but new to FMOD), I have a few comments on this, which might be helpful to you:

  1. afaik, install_name_tool is the correct way to take care of this issue. Its not a problem with XCode because XCode does it for you. Do "man install_name_tool" for details, but as you’ve discovered, its -change for updating dependencies (must be an exact match) and -id for the object itself.

  2. If you’re not careful about the order in which you do things, it is quite easy to create situations where you need to create a symbolic link named @executable_path in order to link successfully. This is because the loader (dyld) knows how to resolve @executable_path, but the linker (ld) does not!

  3. TO THE FMOD DEVS: A related issue, is that if you don’t create the binary correctly, install_name_tool can fail. If you aren’t already, please use -headerpad_max_install_names when you link to avoid the problem. Otherwise, install_name_tool can fail, if the old name is too much shorter than the new name.

Best regards,
Steve

  • You must to post comments
0
0

thanks for your help mathew! But I still need you (or anybody else!) to run my app.
I tried to change the reference using install_name_tool and the script given on brockwolf website, but I still have this link error. Can you please tell me step by step what I have to do? 😥

  • You must to post comments
Showing 1 - 20 of 26 results
Your Answer

Please first to submit.