[vtkusers] VTK 5.8 + CMake: "target platform does not support dynamic linking."
Nico Schlömer
nico.schloemer at gmail.com
Tue Sep 4 09:53:04 EDT 2012
Hi,
I'm on an early release of Ubuntu 12.10 and noticed that VTK might
have problems here.
$ sudo apt-get install libvtk5-dev
installs fine. When trying to write an application that uses VTK and
manage it with CMake, the typical CMakeLists.txt would look like
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
FIND_PACKAGE(VTK REQUIRED)
PROJECT(test CXX)
And indeed, VTK is correctly found under /usr/lib/vtk-5.8/VTKConfig.cmake.
Upon actually creating the Makefiles howver, CMake will complain that
CMake Warning (dev) at /usr/lib/vtk-5.8/VTKTargets.cmake:244 (ADD_LIBRARY):
ADD_LIBRARY called with SHARED option but the target platform does not
support dynamic linking. Building a STATIC library instead. This may lead
to problems.
Call Stack (most recent call first):
/usr/lib/vtk-5.8/VTKConfig.cmake:200 (INCLUDE)
/usr/share/cmake-2.8/Modules/FindVTK.cmake:73 (FIND_PACKAGE)
CMakeLists.txt:4 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it
What does this warning mean and how is it dealt with?
This refers to the (seemingly correct?) line
ADD_LIBRARY(vtkChartsTCL SHARED IMPORTED)
Has anyone else experienced this before, or knows a workaround?
Cheers,
Nico
More information about the vtkusers
mailing list