Problem with CMake and VTK

Hello! I’m trying to build VTK-8.2.0 using CMake and using Visual Studios 2019 as my configuration platform. Yet I keep getting an error about using either incorrect/unofficial files and it won’t even start the build. I’m on a Windows 10 computer but I’m not sure if that is the issue. This is my first time using either VTK or CMake so it’s entirely possible that I’m doing this all wrong

Can you show the error messages that you are getting? Are they coming from CMake or Visual Studio?

I believe its from CMake these are the two things I’m getting from ItError Box CMake

Maybe the problem is that Visual Studio has not been fully configured yet. After installation, you need to start Visual Studio, log in with your Microsoft account, etc.

Can you post the portion of C:/VTK/Bin/CMakeFiles/CMakeOutput.log that has the error?

here is the CMakeOutput there isn’t much to itcmakeoutput

With the Visual studios it is connected to my github and I haven’t had any problems coding with it so far

I usually open a Visual Studio x64 Native Tools command prompt (should be in Start Menu->Visual Studio 2019 ) and then launch cmake-gui.exe from the command line (e.g., “C:\Program Files\CMake\bin\cmake-gui.exe”)

Which build toolsets have you installed with Visual Studio?
What is the complete error message? (your screenshot only shows “Configuring incomplete…” but you can scroll up to see the actual error message)

Don’t think I have any because you needed that. this is the error message

Awesome, this tells exactly what the issue is: CMake did not find the compiler toolset that you chose when you configured your project. The problem is not related to VTK, just CMake and Visual Studio.

Maybe you did not installed Visual Studio in the default install location, you have multiple Visual Studio installed, or at some point you have uninstalled a Visual Studio version, which left behind traces that confused CMake. Following @mchinand’s suggestion above should take care of such issues.

If you still have problems when you run CMake from the Visual Studio command prompt then it means that you haven’t installed the toolset what you choose to configure your project with. Both toolset version and bitness must match.

So I Downloaded the C++ compiler from Microsoft for Visual Studios and so far it looks like it’s working and I’m not getting any bugs or errors. So not having a build toolset was the issue. Thanks everyone for all the help

1 Like