[Lazarus] Error compiling Lazarus svn 14407

Luiz Americo Pereira Camara luizmed at oi.com.br
Tue Mar 4 15:28:50 CET 2008


Le Mar 4, 2008 à 10:30 AM, Marc Weustink a écrit :

> 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)


It is like a "stop rule" : when you have to find this lib, you have to  
use the other lib.

Consequently, when the linker find its two lib :

/usr/X11R6/lib/libGL.dylib
and
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/ 
libGL.dylib
it will be forced to use "/System/Library/Frameworks/OpenGL.framework/ 
Versions/A/Libraries/libGL.dylib", even if the name is the same in  
this case.




--
Damien Gerard
milipili at shikami.org

"Intelligence is 10 million rules."
    -- Douglas Lenat









More information about the Lazarus mailing list