# Build error in VTK-based project: "include called with wrong number of arguments. include() only takes one file."

**URL:** https://discourse.vtk.org/t/build-error-in-vtk-based-project-include-called-with-wrong-number-of-arguments-include-only-takes-one-file/2078
**Category:** Development
**Created:** [November 9, 2019, 11:25pm UTC](https://discourse.vtk.org/t/build-error-in-vtk-based-project-include-called-with-wrong-number-of-arguments-include-only-takes-one-file/2078 "2019-11-09T23:25:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [November 9, 2019, 11:25pm UTC](https://discourse.vtk.org/t/build-error-in-vtk-based-project-include-called-with-wrong-number-of-arguments-include-only-takes-one-file/2078/1 "2019-11-09T23:25:54Z")

</div>

I’m making progress with building 3D Slicer with VTK master.

Now build fails where a VTK-based library is configured. The error message is:

> include called with wrong number of arguments. include() only takes one file.

After some digging and internet search it turned out that it caused trouble at a number of other projects, too ([VTK examples](http://vtk.1045678.n5.nabble.com/Missing-Includes-with-new-module-system-td5749652.html), [PCL](https://github.com/PointCloudLibrary/pcl/issues/3408), etc).

The solution is to delete `include(${VTK_USE_FILE})`, which was necessary for building with older VTK versions.

To make transition of projects to VTK-8.9 easier and avoid unnecessary developer frustration, please create a dummy VTK\_USE\_FILE that prints a meaningful warning message (or prints an error message and aborts the build). This mechanism only need to kept until most projects make their transition (can be removed in a couple of years).

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [November 10, 2019, 7:39am UTC](https://discourse.vtk.org/t/build-error-in-vtk-based-project-include-called-with-wrong-number-of-arguments-include-only-takes-one-file/2078/2 "2019-11-10T07:39:51Z")

</div>

Also, ˋUtilities/Maintenance/FindNeededModules.pyˋ is useful for determining what modules are needed. It generates a find\_package(VTK COMPONENTS …) command for CMake. It is specific for the VTK master i.e. 8.90 and more recent.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [November 12, 2019, 1:32am UTC](https://discourse.vtk.org/t/build-error-in-vtk-based-project-include-called-with-wrong-number-of-arguments-include-only-takes-one-file/2078/3 "2019-11-12T01:32:21Z")

</div>

Submitted an issue on VTK bugtracker to track this: [https://gitlab.kitware.com/vtk/vtk/issues/17725](https://gitlab.kitware.com/vtk/vtk/issues/17725)
