[vtkusers] Help compiling on Mac PPC with OS X

Sander Niemeijer niemeijer at science-and-technology.nl
Wed Jun 23 06:27:03 EDT 2004


Hi John,

If you want an X11 build you should definitely use -lGL and -lGLU for 
your OPENGL_gl(u)_LIBRARY settings. Don't use -framework OpenGL and 
don't turn on both VTK_USE_CARBON and VTK_USE_X at the same time.

It seems that you are trying to build completely against static 
libraries. This may be the source of your problem.
If you run ldd against /usr/X11R6/lib/libGL.dylib, you will see that it 
depends on /usr/lib/libXplugin.1.dylib. If you are linking against a 
static version of libGL I can imagine that you also have to manually 
add any static libraries (such as libXplugin) that libGL depends on.
My guess is that adding a -lXplugin to your CMAKE_X_LIBS setting should 
do the trick.

Best regards,
Sander

On woensdag, jun 23, 2004, at 04:12 Europe/Amsterdam, John Norris wrote:

> Hi,
>
> I had set up for a verbose compile, so I could see that -lGL and -lGLU 
> were
> already included when trying to link.
>
> I found the solution though, when I remembered the nm command.  A 
> little
> poking around revealed that these symbols were defined in
> /usr/X11R6/lib/libXplugin.a .  I changed
>
> OPENGL_gl_LIBRARY: -framework OpenGL
>
> to
>
> OPENGL_gl_LIBRARY: -lXplugin;-framework OpenGL
>
> and everything linked just fine.  I even turned VTK_USE_CARBON back 
> on.  I
> haven't tried to run anything yet, though.  :^/
>
> Has no one else had to link in libXplugin.a to compile with X included?
>
> John
>
> Once upon a time, Paul Schmiedge wrote:
>> Hi John,
>>
>> I recently succeeded in creating an X-only build on Panther, and I was
>> also suffering from link errors at first.  What I ended up doing was
>> manually changing these two lines:
>>
>> OPENGL_gl_LIBRARY: -framework OpenGL
>> OPENGL_glu_LIBRARY: -framework AGL
>>
>> To the OGL libraries that go with Apple's X11:
>>
>> OPENGL_gl_LIBRARY: /usr/X11R6/lib/libGL.a
>> OPENGL_glu_LIBRARY: /usr/X11R6/lib/libGLU.a
>>
>> See if that helps.
>>
>> ~Paul S.
>>
>> On Jun 22, 2004, at 2:58 PM, Johnny C. Norris II wrote:
>>
>>> Okay, I grabbed CMake from cvs and updated VTK from cvs.  I 
>>> configured
>>> VTK with VTK_USE_X turned on, and VTK_USE_CARBON and VTK_USE_COCOA
>>> turned off.  I still get the same undefined symbols when linking the
>>> rendering lib.
>>>
>>> The machine I'm compiling on is supposed to be Panther with the X11
>>> option.  It definitely has the X headers and libs under /usr/X11R6.
>>> Is there a way to confirm from the command prompt that it's actually
>>> running Panther?
>>>
>>> Here are the X11 and OpenGL-related values from CMakeCashe.txt.  Does
>>> anyone notice anything obviously wrong?
>>>
>>> CMAKE_X_CFLAGS: -I/usr/X11R6/include
>>> CMAKE_X_LIBS:
>>> lSM;-lICE;/usr/X11R6/lib/libX11.a;/usr/X11R6/lib/libXext.a
>>> OPENGL_INCLUDE_DIR: /usr/X11R6/include
>>> OPENGL_gl_LIBRARY: -framework OpenGL
>>> OPENGL_glu_LIBRARY: -framework AGL
>>> OPENGL_xmesa_INCLUDE_DIR: OPENGL_xmesa_INCLUDE_DIR-NOTFOUND
>>> X11_X11_INCLUDE_PATH: /usr/X11R6/include
>>> X11_X11_LIB: /usr/X11R6/lib/libX11.a
>>> X11_Xext_LIB: /usr/X11R6/lib/libXext.a
>>> X11_Xlib_INCLUDE_PATH: /usr/X11R6/include
>>> X11_Xutil_INCLUDE_PATH: /usr/X11R6/include
>>>
>>> Thanks,
>>> John
>
> -- 
> John Norris
> Research Programmer
> Center for Simulation of Advanced Rockets
> http://www.uiuc.edu/ph/www/jnorris
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: 
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list