[vtk-developers] syntax error near unexpected token `('

David Doria daviddoria at gmail.com
Wed May 2 13:21:53 EDT 2012


I have a Qt/VTK project that I just tried to build with git master
VTK. I was getting this error:

[ 33%] Generating moc_MovablePatch.cxx
/bin/sh: -c: line 0: syntax error near unexpected token `('
generating /home/doriad/build/TestQt/moc_MovablePatch.cxx (moc)
make[2]: *** [moc_MovablePatch.cxx] Error 1
make[1]: *** [CMakeFiles/myProject.dir/all] Error 2

Not sure what it meant, I broke out the MovablePatch.h/cpp code so it
could be compiled on its own. I removed all VTK dependencies, and it
built fine. I then simply added (without touching the code, now
Qt-only)

FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})

to the CMakeLists.txt file, and the error came back! When I point
CMake to a VTK5.8 build, it builds correctly.

Any suggestions?

David



More information about the vtk-developers mailing list