c++cmakevtkopencascade

How to solve LINK : fatal error LNK1181: cannot open input file 'vtkCommonCore-9.0.lib'


I use the library OpenCasCade for a C++ project on windows. I have updated it to 7.4.0 with conda. A new version of vtk (vtk-9.0.1) came with it

I build the project with CMake. There was no problem before the update and since, when I compile I have the message LINK : fatal error LNK1181: cannot open input file 'vtkCommonCore-9.0.lib.

I tried to link directly vtk with find_package without success...

It would be nice if someone has a clue ?


Solution

  • As suggested on this link vtk_link

    I added the command in my CMakeLists.txt

    find_package(VTK  REQUIRED  COMPONENTS CommonCore RenderingOpenGL2)
    

    But nothing changed.

    Finally, I have solved the problem. From conda the package OCCT came with a vtk dependency. I have chosen the same OCCT version (7.4.0) but with a former build number. It solves the problem.