On 14 Nov 2009, at 15:26, Loic wrote:
> Actually, the error message is the following:
>
>> ./frog
> dyld: Library not loaded: /usr/local/lib/libfltk_gl.1.1.dylib
>   Referenced from: /Users/madgraph/loic_Debug/FROG_2_0_2/frog/./frog
>   Reason: image not found
> Trace/BPT trap
>
> if I do:
>> ld Lib/libfrog.dylib
> ld: warning can't open dynamic library: /usr/local/lib/libfltk_gl. 
> 1.1.dylib (checking for undefined symbols may be affected) (No such  
> file or directory, errno = 2)
> ld: warning can't open dynamic library: /usr/local/lib/ 
> libfltk_images.1.1.dylib (checking for undefined symbols

This is all to do with the way that the OSX dynamic linker locates  
and loads dylibs.
Now, there are a few things you can do, but to be frank you are going  
to have to sit down and read the OSX linker (and probably Xcode) docs  
and learn how to build you project so that the library path is set to  
load some (or all) of the shared libs from within the bundle. It is  
possible, but it is not the default, and generally requires that you  
tweak your exe after it is built to tell it where to find the dylibs.
Note that OSX exe's have the paths to the dylibs they need sort of  
hard-coded into them at build time, and this is probably what is  
causing your issues.

Some tools that might help on OSX are:
otool -L
install_name_tool
libtool

Note that the time-honoured linux/unix solution of setting  
LD_LIBRARY_PATH generally does not work on OSX.

However: My recommendation is this. Dump the dynamic linking, remove  
the --enable-shared from your configure, switch to static linking of  
fltk and its support libs.
End Of Problems.





_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to