[vtkusers] compiling with vtk

Sgouros, Thomas thomas_sgouros at brown.edu
Fri Apr 6 07:48:29 EDT 2018


Hi All:

I have a CMakeLists.txt file with this in it:

find_package(VTK REQUIRED)
include(${VTK_USE_FILE})

message(STATUS "VTK: ${VTK_LIBRARIES}")
 ...


And a subdirectory CMakeLists.txt file with this:

add_executable(vtkObjViewer vtkObjViewer.cxx)
target_link_libraries(vtkObjViewer PUBLIC MinVR::MinVR
  ${VTK_LIBRARIES}



That produces this output:

-- VTK: vtksys;vtkCommonCore;vtkCommonMath;vtkCommonMisc;...

...

[ 50%] *Linking CXX executable ../bin/vtkObjViewer*

ld: library not found for -lvtksys

clang: *error: *linker command failed with exit code 1 (use -v to see
invocation)

make[2]: *** [bin/vtkObjViewer] Error 1

make[1]: *** [examples/CMakeFiles/vtkObjViewer.dir/all] Error 2

make: *** [all] Error 2


The vtksys library is obviously wtihin the libraries list, right there at
the front, and I've confirmed that libvtksys exists and is in the directory
where I've pointed cmake. Can anyone help me understand what I'm doing
wrong? Or at least what else I should check?

Thank you,

 -Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180406/acd644a8/attachment.html>


More information about the vtkusers mailing list