[vtkusers] OSX Mountain Lion - shared libraries

Boxer, Aaron Aaron.Boxer at uhn.ca
Thu Jan 23 23:10:55 EST 2014


Thanks, David.  I will give this a try.
Aaron

-----Original Message-----
From: David Gobbi [mailto:david.gobbi at gmail.com] 
Sent: Thursday, January 23, 2014 10:59 PM
To: Boxer, Aaron
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] OSX Mountain Lion - shared libraries

Hi Aaron,

When you build VTK, or when you build your own programs against the VTK libraries, cmake bakes the load path into the libraries and the executables that it produces.  So in general, no paths have to be set.
 The run-time libraries will be found automatically.

CMake will strip out these baked-in library paths when you run a make install, so that the installed VTK programs will only search the system library paths, rather than searching your build directory for the libraries.  So if you install libraries to some location that is not in the system library path, then you will need to use DYLD_LIBRARY_PATH or some other path-setting mechanism.

More information (general info, not specific to OS X) is available on the wiki: http://www.cmake.org/Wiki/CMake_RPATH_handling

  David



On Thu, Jan 23, 2014 at 8:43 PM, Boxer, Aaron <Aaron.Boxer at uhn.ca> wrote:
> Thanks, David.  Is there anything special I need to do to use shared 
> libraries (besides the CMake switch ?) My current install directory is the VTK build directory - perhaps this needs to change so that the library gets recognized?
>
> Currently I am linking to static libraries.
>
> Aaron
>
> -----Original Message-----
> From: David Gobbi [mailto:david.gobbi at gmail.com]
> Sent: Thursday, January 23, 2014 10:41 PM
> To: Boxer, Aaron
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] OSX Mountain Lion - shared libraries
>
> Hi Aaron,
>
> You should be able to build VTK master with any version of OS X from
> 10.5 through to 10.9, with either static or with shared libraries.
>
> My default builds have always been shared builds.   It has never the
> case that VTK was limited to static builds on any operating system, as far as I am aware.
>
>   David
>
>
> On Thu, Jan 23, 2014 at 7:55 PM, Boxer, Aaron <Aaron.Boxer at uhn.ca> wrote:
>> Hello,
>>
>> All of the guides to building VTK on OSX that I have seen recommend 
>> that shared libraries be turned off.
>>
>> Is this still the case? Can I build VTK master on mountain lion with 
>> xcode 5 and shared libraries turned on?
>>
>>
>>
>> Thanks!
>>
>> Aaron
>
> This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient.
> Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited.
> If you have received this e-mail in error, please contact the sender and delete all copies.
> Opinions, conclusions or other information contained in this e-mail may not be that of the organization.
>

This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
If you have received this e-mail in error, please contact the sender and delete all copies. 
Opinions, conclusions or other information contained in this e-mail may not be that of the organization.



More information about the vtkusers mailing list