<div dir="ltr">Alexandre,<div><br></div><div>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.</div>
<div><br></div><div>It works for me, last I checked.</div><div><br></div><div>- Wes</div><div><br><div class="gmail_quote">On Wed, Jul 23, 2008 at 11:34 AM, Alexandre GOUAILLARD <<a href="mailto:Alexandre_Gouaillard@hms.harvard.edu">Alexandre_Gouaillard@hms.harvard.edu</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all,<br>
<br>
When compiling VTK with X support under macOS 10.5, there is a known issue<br>
with the linking of the OpenGL dynamic libraries.<br>
The workaround seems to consist in adding the following line to the linker<br>
flag:<br>
-dylib_file<br>
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib<br>
:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dyli<br>
b<br>
<br>
When I had this in CMAKE to the SHARED_LINKER flag, everything compiles<br>
fine.<br>
<br>
Then I turn BUILD_EXAMPLES ON (or I try to compile KWWIDGETS from VTK), with<br>
the above line added to the EXE_LINKER flag, and it does not seems to do the<br>
trick:<br>
<br>
Internal cmake changing into directory:<br>
/Users/alex/Devel/CVSROOT/VTK-CVS/BUILD-RELEASE/Examples/All<br>
======== CMake output     ======<br>
======== End CMake output ======<br>
Linking CXX executable<br>
/Users/alex/Devel/CVSROOT/VTK-CVS/BUILD-RELEASE/bin/HierarchicalBoxPipeline<br>
ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib<br>
collect2: ld returned 1 exit status<br>
<br>
<br>
I also tried to add it to the LDFLAGS in the shell before runinng cmake,<br>
does not work.<br>
<br>
Any idea?<br>
<br>
Alex.<br>
<br>
<br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>R&D Engineer<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-371-3971 x120
</div></div>