<div dir="ltr">Thanks David,<div><br></div><div style>I installed my static Tcl/Tk libs and it worked out too... so long as you do a "sudo make install_private_headers"</div><div style><br></div><div style>I always thought Tk bundled X11 libs solely for win32 benefits but it seems Aqua builds require them over the system libs. When you diff the tk Xlib.h against the system one they are quite different.</div>
<div style><br></div><div style>Also there was a small link problem too - "-framework Carbon" had to be added to linker.</div><div style><br></div><div style>Goodwin</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Feb 26, 2013 at 4:16 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Goodwin,<br>
<br>
For Win32 builds, there is a CMake variable called TK_XLIB_PATH that<br>
is set to the directory where X11/Xlib.h is to be found. As far as I<br>
understand, that variable is only needed when you are building VTK<br>
against a Tk source directory. Once Tk is installed, the X11<br>
directory is installed in the Tk include directory and X11/Xlib.h is<br>
found automatically.<br>
<br>
So I'm guessing that the reason the TK_XLIB_PATH variable isn't<br>
present under OS X is that very few people (or maybe no people) have<br>
ever tried building against a Tk source directory on OS X.<br>
<br>
If you're interested you can grep the VTK cmake files for TK_XLIB_PATH<br>
to see how things are done for Windows, and then make things work the<br>
same way for OS X.<br>
<br>
- David<br>
<br>
<br>
On Mon, Feb 25, 2013 at 7:17 PM, Goodwin Lawlor<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:goodwin.lawlor.lists@gmail.com">goodwin.lawlor.lists@gmail.com</a>> wrote:<br>
><br>
> Looking at the Tk Makefile, it seems that when building static libs with Aqua you have to force the inclusion of Xlib.h from the Tk source tree (ie, from the tk/xlib directory)<br>
><br>
> So, adding<br>
><br>
> INCLUDE_DIRECTORIES(BEFORE ${TK_INCLUDE_PATH}/../xlib)<br>
><br>
> to VTK/Rendering/CMakeLists.txt fixed things.<br>
><br>
> hth someone.<br>
><br>
> Goodwin<br>
><br>
> On Mon, Feb 25, 2013 at 10:02 PM, Goodwin Lawlor <<a href="mailto:goodwin.lawlor.lists@gmail.com">goodwin.lawlor.lists@gmail.com</a>> wrote:<br>
>><br>
>> Hi All,<br>
>><br>
>> I'm building VTK (5.10.1 and Nightly) on Mac OS X 10.7.5<br>
>><br>
>> I'm building static libs with Tcl wrappers (v8.5.13 and v8.6).<br>
>><br>
>> The build fails on vtkTkRenderWidget with<br>
>><br>
>> In file included from /Users/GoodwinLawlor/code/VTK/Rendering/vtkTkRenderWidget.cxx:35:<br>
>> In file included from /Users/GoodwinLawlor/code/tcltk/tk8.6/generic/tkInt.h:19:<br>
>> In file included from /Users/GoodwinLawlor/code/tcltk/tk8.6/generic/tkPort.h:25:<br>
>> In file included from /Users/GoodwinLawlor/code/tcltk/tk8.6/macosx/tkMacOSXPort.h:56:<br>
>> /Users/GoodwinLawlor/code/tcltk/tk8.6/generic/tkIntXlibDecls.h:380:16: error: conflicting types for 'XKeycodeToKeysym'<br>
>> EXTERN KeySym XKeycodeToKeysym(Display *d, KeyCode k, int i);<br>
>> ^<br>
>> /usr/include/X11/Xlib.h:1694:15: note: previous declaration is here<br>
>> extern KeySym XKeycodeToKeysym(<br>
>><br>
>> I've got VTK_USE_X = 0 and VTK_USE_COCOA = 1<br>
>><br>
>> Basically, tkIntXlibDecls.h is declaring the same types as Xlib.h<br>
>><br>
>> Grateful for any hints before going grepping...<br>
>><br>
>> Thanks,<br>
>><br>
>> Goodwin<br>
</div></div></blockquote></div><br></div>