[Lazarus] OS X/Carbon Compilation

Marc Weustink marc.weustink at cuperus.nl
Tue Mar 4 10:30:46 CET 2008


Damien Gerard wrote:
> Le Mar 1, 2008 à 12:32 AM, Marc Weustink a écrit :
> 
>> Damien Gerard wrote:
>>> Consequently, a simple solution is :
>>>
>>> make clean all LCL_PLATFORM=carbon FPC=fpc OPT="-k-framework -kcarbon
>>> -k-framework -kOpenGL -k'-dylib_file' -k'/System/Library/Frameworks/
>>> OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/
>>> Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib'"
>>
>> is there a reason to put
>> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/ 
>> libGL.dylib
>> there twice ?
>>
> 
> According to the man of ld :
> -dylib_file install_name:file_name
> 
> Specifies that a dynamic shared library is in a different location  
> than its standard location. Use this option when you link with a  
> library that is dependent on a dynamic library, and the dynamic  
> library is in a location other than its default location. install_name  
> specifies the path where the library normally resides. file_name  
> specifies the path of the library you want to use instead. For  
> example, if you link to a library that depends upon the dynamic  
> library libsys and you have libsys installed in a nondefault location,  
> you would use this option:
>     -dylib_file /lib/libsys_s.A.dylib:/me/lib/libsys_s.A.dylib.
> 
> As far I know, you have to set the two options.


Yeah... thats clear to me, but soemthing puzzles me. Why do we need to 
tell the linker that file /some/path/to/foo.dylib is located at exact 
that path /some/path/to/foo.dylib (how surprising)


Marc




More information about the Lazarus mailing list