Thanks for the suggested fix. Committed and pushed. I agree that something should be done with ITK if possible to address this, but I am not sure what.
The --as-needed linker flag may help, but it may also break things... http://www.gentoo.org/proj/en/qa/asneeded.xml Thanks, Matt On Tue, Nov 13, 2012 at 7:28 PM, Bill Lorensen <[email protected]> wrote: > I agree that it needs to be fixed (somehow) in ITK. But these examples > should work with and ITKv4 release. These cmake lines allow that. > > On Tue, Nov 13, 2012 at 2:27 PM, David Doria <[email protected]> wrote: >> On Tue, Nov 13, 2012 at 2:20 PM, Bill Lorensen <[email protected]> >> wrote: >>> Matt, >>> >>> I built the examples against my own ITK that included the vtk glue >>> classes. In order to get the examples to link I had to add >>> if(ITKVtkGlue_LOADED) >>> find_package( VTK REQUIRED ) >>> if( ${VTK_FOUND} ) >>> include( ${VTK_USE_FILE} ) >>> endif() >>> endif() >>> >>> to >>> src/Examples/CMakeLists.txt >>> >>> This could very well be an ITK issue, but these changes allowed me to >>> build and link the examples. >>> >>> Bill >> >> I believe I have seen several variants of this problem when building >> other projects against ITK with ITKVtkGlue turned ON. Shouldn't ITK >> already make VTK available to the client project? You shouldn't be >> able to turn ITKVtkGlue on when building ITK if VTK is not found, so >> one would assume that ITK has already included VTK since it requires >> it. Then why should the client have to include it again? >> >> And potentially the same problem - I've had projects that do NOT >> require VTK fail to link when built against an ITK build with >> ITKVtkGlue turned on because they could not find VTK libs (even though >> they don't require them). >> >> Summary - I think this is something that needs to be fixed in ITK >> (ITKVtkGlue). >> >> David > > > > -- > Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://www.itk.org/mailman/listinfo/insight-developers
