[vtkusers] An error

Cory Quammen cory.quammen at kitware.com
Sun Jan 17 12:24:12 EST 2016


Hi,

You are missing a space in your CMakeLists.txt file after each
occurrence of ${PROJECT_NAME}. This needs to be fixed in the call to
'add_executable' and 'target_link_libraries'.

- Cory

On Sun, Jan 17, 2016 at 7:18 AM, 贾鹏飞 <pengfeijia11 at sjtu.edu.cn> wrote:
> Hello:
>     I am new for VTK, I met this problem and I do not know why ,hoping that
> youcan help me
>    Enclosed are the error pictures
>
> Thank you
>   VS:2010
>   VTK:5.10.1
>   Cmake:2.8.11.1
>
>
> CmakeLists.txt is as follows:
>
> cmake_minimum_required(VERSION2.8)
>
> project(TestVTKInstall)
>
> find_package(VTKREQUIRED)
>
> include(${VTK_USE_FILE})
>
> add_executable(${PROJECT_NAME}TestVTKInstall.cpp)
>
> target_link_libraries(${PROJECT_NAME}vtkRendering vtkCommon)
>
>
>
> TestVTKInstall.cpp is as follows
>
> #include"vtkRenderWindow.h"
>
> #include"vtkSmartPointer.h"
>
> intmain()
>
> {
>
>  vtkSmartPointer<vtkRenderWindow> renWin=
> vtkSmartPointer<vtkRenderWindow>::New();
>
>  renWin->Render();
>
>
>
>  std::cin.get();
>
>  return 0;
>
> }
>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



-- 
Cory Quammen
R&D Engineer
Kitware, Inc.


More information about the vtkusers mailing list