[vtkusers] OpenGL linking issue on Mac 10.5

Wes Turner wes.turner at kitware.com
Wed Jul 23 11:49:41 EDT 2008


Alexandre,
Try adding the entire string
"-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
to CMAKE_EXE_LINKER_FLAGS, CMAKE_SHARED_LINKER_FLAGS, and
CMAKE_MODULE_LINKER_FLAGS.

It works for me, last I checked.

- Wes

On Wed, Jul 23, 2008 at 11:34 AM, Alexandre GOUAILLARD <
Alexandre_Gouaillard at hms.harvard.edu> wrote:

> Hi all,
>
> When compiling VTK with X support under macOS 10.5, there is a known issue
> with the linking of the OpenGL dynamic libraries.
> The workaround seems to consist in adding the following line to the linker
> flag:
> -dylib_file
>
> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
>
> :/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dyli
> b
>
> When I had this in CMAKE to the SHARED_LINKER flag, everything compiles
> fine.
>
> Then I turn BUILD_EXAMPLES ON (or I try to compile KWWIDGETS from VTK),
> with
> the above line added to the EXE_LINKER flag, and it does not seems to do
> the
> trick:
>
> Internal cmake changing into directory:
> /Users/alex/Devel/CVSROOT/VTK-CVS/BUILD-RELEASE/Examples/All
> ======== CMake output     ======
> ======== End CMake output ======
> Linking CXX executable
> /Users/alex/Devel/CVSROOT/VTK-CVS/BUILD-RELEASE/bin/HierarchicalBoxPipeline
> ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib
> collect2: ld returned 1 exit status
>
>
> I also tried to add it to the LDFLAGS in the shell before runinng cmake,
> does not work.
>
> Any idea?
>
> Alex.
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Wesley D. Turner, Ph.D.
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x120
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080723/9905de42/attachment.htm>


More information about the vtkusers mailing list