<div dir="ltr">I forgot to mention that the other reason for not explicitly setting the version of OSX in the CMakeLists.txt file is because when I do set it appropriately (as you suggested), compilation inexplicably raises the following error, suggesting that outdated SDKs are required:<div>
<p class=""><span class="">make[2]: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', needed by `travel_depth/TravelDepthMain'. Stop.</span></p></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div style="font-size:12.8000001907349px">Cheers,</div><div style="font-size:12.8000001907349px">@rno</div></div></div></div>
<br><div class="gmail_quote">On Thu, Dec 10, 2015 at 10:46 PM, Arno Klein <span dir="ltr"><<a href="mailto:binarybottle@gmail.com" target="_blank">binarybottle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I built VTK 6 through the Anaconda Python distribution ("conda install vtk" installed 6.3).<div><br></div><div>I placed the three lines you recommended in the top-level CMakeLists.txt file in my library:</div><div><div>SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.11")</div><div>SET(CMAKE_OSX_ARCHITECTURES "x86_64")</div><div>SET(CMAKE_OSX_SYSROOT "macosx10.11")</div></div><div><br></div><div>This enabled the make command to compile farther than I have been able to get so far. However, it requires someone to explicitly specify which version of MacOSX, which I was hoping to avoid. Previously, I was using:</div><div><br></div><div><div>#<a href="https://forums.developer.apple.com/thread/17334" target="_blank">https://forums.developer.apple.com/thread/17334</a></div><div>SET(CMAKE_OSX_DEPLOYMENT_TARGET "")</div><div>SET(CMAKE_OSX_SYSROOT /)</div><div><br></div><div>or:</div><div><br></div><div># <a href="https://cmake.org/Bug/view.php?id=14695" target="_blank">https://cmake.org/Bug/view.php?id=14695</a></div><div>SET(MACOSX_DEPLOYMENT_TARGET ${DARWIN_MAJOR_SDK_VERSION}.${DARWIN_MINOR_SDK_VERSION})</div><div>SET(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS}")<br></div><div><br></div></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div style="font-size:12.8000001907349px">Cheers,</div><div style="font-size:12.8000001907349px">@rno</div></div></div></div><div><div class="h5">
<br><div class="gmail_quote">On Thu, Dec 10, 2015 at 10:14 PM, 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"><div dir="ltr">Actually I might have misunderstood your issue. Did you build VTK 6 yourself, or did you download a binary package? In either case, the three cmake variables that I mentioned above should be set the same in your own project as they are in the VTK that you are building against.</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 10, 2015 at 11:00 PM, 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"><div dir="ltr">You can try setting the SDK info in the CMakeCache.txt:<div><br></div><div><div>CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.11</div><div>CMAKE_OSX_ARCHITECTURES:STRING=x86_64</div><div>CMAKE_OSX_SYSROOT:STRING=macosx10.11</div></div><div><br></div><div>I recommend deleting your entire build directory, creating a new CMakeCache.txt that has only these three lines, and then re-running cmake.</div><span><font color="#888888"><div><br></div><div> - David</div><div><br></div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 10, 2015 at 10:49 PM, Arno Klein <span dir="ltr"><<a href="mailto:binarybottle@gmail.com" target="_blank">binarybottle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">'gcc tmp.cpp' created an 'a.out' file, and I have been able to compile other things, so I guess my Xcode installation is fine. What do you recommend I try next?</div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div style="font-size:12.8000001907349px">Cheers,</div><div style="font-size:12.8000001907349px">@rno</div></div></div></div><div><div>
<br><div class="gmail_quote">On Thu, Dec 10, 2015 at 7:52 PM, 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"><div dir="ltr">The header unistd.h is posix standard and comes with every Xcode SDK. Try compiling the following trivial program. If it doesn't compile, then there must be something awry with your Xcode installation:<div><br></div><div><div>#include <unistd.h></div><div>int main()<br></div><div>{</div><div> return 0;</div><div>}</div></div><span><font color="#888888"><div class="gmail_extra"><br></div><div class="gmail_extra"> - David</div></font></span><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 10, 2015 at 7:39 PM, Arno Klein <span dir="ltr"><<a href="mailto:binarybottle@gmail.com" target="_blank">binarybottle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you for your help!<br><br>I am now able to compile with cmake on linux, but get the following error on macosx 10.11, even though there is no "unistd.h" anywhere in my github repo (<a href="https://github.com/nipy/mindboggle/issues/69" target="_blank">https://github.com/nipy/mindboggle/issues/69</a>):<br><br>Scanning dependencies of target FsSurfaceReader<br>[ 3%] Building CXX object CMakeFiles/FsSurfaceReader.dir/FsSurfaceReader.cpp.o<br>In file included from /software/mindboggle/surface_cpp_tools/FsSurfaceReader.cpp:13:<br>In file included from /software/mindboggle/surface_cpp_tools/FsSurfaceReader.h:16:<br>In file included from /usr/local/include/vtk-6.0/vtkPolyData.h:58:<br>In file included from /usr/local/include/vtk-6.0/vtkPointSet.h:30:<br>In file included from /usr/local/include/vtk-6.0/vtkDataSet.h:41:<br>In file included from /usr/local/include/vtk-6.0/vtkDataObject.h:36:<br>In file included from /usr/local/include/vtk-6.0/vtkObject.h:42:<br>In file included from /usr/local/include/vtk-6.0/vtkObjectBase.h:44:<br>In file included from /usr/local/include/vtk-6.0/vtkIndent.h:25:<br>In file included from /usr/local/include/vtk-6.0/vtkSystemIncludes.h:36:<br>In file included from /usr/local/include/vtk-6.0/vtkIOStream.h:33:<br>In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:37:<br>/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:23:10: fatal error: <br>'unistd.h' file not found<br>#include <br>^<br>1 error generated.<br>make[2]: *** [CMakeFiles/FsSurfaceReader.dir/FsSurfaceReader.cpp.o] Error 1<br>make[1]: *** [CMakeFiles/FsSurfaceReader.dir/all] Error 2<br>make: *** [all] Error 2<div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div style="font-size:12.8px">Cheers,</div><div style="font-size:12.8px">@rno</div></div></div></div><div><div>
<br><div class="gmail_quote">On Thu, Dec 3, 2015 at 6:25 AM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I agree with Cory on Update() being redundant before the Write().<div><br></div><div><span><span style="font-size:13px">> </span><span style="font-size:13px">vtkDataObject* dobj = someAlgorithm->GetOutput(1);</span><br style="font-size:13px"><span style="font-size:13px">> dobj->Update();</span><br style="font-size:13px"><br style="font-size:13px"><span style="font-size:13px">should become:</span><br style="font-size:13px"><br></span> someAlgorithm->Update(1); //to make sure there is something valid<br><span style="font-size:13px"> vtkDataObject* dobj = someAlgorithm->GetOutput(1); //keep the output for later use</span><br style="font-size:13px"><br></div><div>Because since vtk6, dobj no longer has any connection to the algorithm, so updating it (which used to update the algorithm for you) no longer has any meaning.</div><span><font color="#888888"><div><br></div><div><br></div></font></span></div><div class="gmail_extra"><span><font color="#888888"><br clear="all"><div><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a></div></div></font></span><div><div>
<br><div class="gmail_quote">On Thu, Dec 3, 2015 at 9:09 AM, Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Arno,<div><br></div><div>That pattern should be valid in VTK6. Are you getting compile errors?</div><div><br></div><div>I believe the Update() and Write() calls to the writer are redundant - you should need only one.</div><div><br></div><div>Thanks,</div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Wed, Dec 2, 2015 at 5:56 PM, Arno Klein <span dir="ltr"><<a href="mailto:binarybottle@gmail.com" target="_blank">binarybottle@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr"><p>I am trying to update my code to migrate to VTK6 according to:<br><br><a href="http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Removal_of_Update" target="_blank">http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Removal_of_Update</a><br><br>According to the examples on that site, I understand that:<br><br> vtkDataObject* dobj = someAlgorithm->GetOutput(1);<br> dobj->Update();<br><br>should become:<br><br> someAlgorithm->Update(1);<br><br><br>However, I don’t know how to deal with the following pattern:<br><br>void PointAreaComputer::WriteIntoFile(char *fileName)<br>{<br> vtkPolyDataWriter* writer=vtkPolyDataWriter::New();<br> writer->SetFileName(fileName);<br> m_mesh->GetPointData()->SetScalars(m_pointsArea);<br> writer->SetInputData(m_mesh);<br> writer->Update();<br> writer->Write();<br> writer->Delete();<br>}<br><br>What should I do to make this compatible with VTK6?</p><p>Cheers,<br>@rno<br></p><div><div><div dir="ltr"><div dir="ltr"></div></div></div></div>
</div>
</div></div></blockquote></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>