# Problem with extension .cpp vtk\_module\_add\_module

**URL:** https://discourse.paraview.org/t/problem-with-extension-cpp-vtk-module-add-module/16370
**Category:** Development
**Created:** [March 22, 2025, 12:41pm UTC](https://discourse.paraview.org/t/problem-with-extension-cpp-vtk-module-add-module/16370 "2025-03-22T12:41:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![joint](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@joint](https://discourse.paraview.org/u/joint)
#### Post date: [March 22, 2025, 12:41pm UTC](https://discourse.paraview.org/t/problem-with-extension-cpp-vtk-module-add-module/16370/1 "2025-03-22T12:41:21Z")

</div>

Hello!

I have a problem with

```auto
Severity	Code	Description	Project	File	Line	Suppression State	Details
Error CMake Error at VTK/CMake/vtkModule.cmake:3393 (add_library):
  Cannot find source file:

    File.cxx

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
  .ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
  .f95 .f03 .hip .ispc vtkModule.cmake	3393

```

It is called from vtk\_module\_add\_module

However if I try .cxx , it works

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [March 24, 2025, 10:04am UTC](https://discourse.paraview.org/t/problem-with-extension-cpp-vtk-module-add-module/16370/2 "2025-03-24T10:04:11Z")

</div>

VTK currently prefers `cxx` as a source extension. It’d be possible to support others, but there’s nothing there yet.

You can list the files manually. So instead of:

```auto
CLASSES File

```

Pass:

```auto
SOURCES File.cpp
HEADERS File.h

```
