ALL_BUILD Access Denied

I am new to VTK, and I am trying to compiling&installing C++ VTK.

I have downloaded VTK-8.2.0 and follow the instruction like this :

The VTK source code can be downloaded from http://www.vtk.org/ on the Download page. source release ( vtk-8.2.0.zip ) and extact it into C:\MIMIA\ . This will create the folder C:\MIMIA\VTK- 8.2.0 , after which you should manually create the build folder C:\MIMIA\VTKBin.

Now run the CMake GUI:

On Windows It should be in your Applications folder (or Start Menu) under CMake. At some point CMake will ask what compiler system you are using, e.g. Visual Studio 14 (64-bit).
Warning: if you installed a 64-bit version of Python, you should choose a 64-bit build, such as Visual Studio 14 Win64. WARNING: NEVER choose IA64 (unless you are absolutely sure you are using this Microsoft-abandoned, enterprise-server architecture that is not x86-64 compatible).

At the top of the CMake GUI are two fields, one for source code and one for where to build the binaries; the source code directory is the directory where VTK has been extracted (e.g. C:\MIMIA\VTK-8.2.0 ), and the binary directory is the directory in which you want to build (e.g. C:\MIMIA\VTKBin ).

Once your CMake GUI is running, make sure that ā€œGroupedā€ is checked and that ā€œAdvancedā€ is not checked. You now want to ā€œconfigureā€ the system. This will cause cmake to establish environment settings for the build process. Once finished, you will be presented with a (nested) list of optional or unknown values for you to change as needed (these will typically be shown in red).

Make sure that BUILD_SHARED_LIBS , BUILD_EXAMPLES , and BUILD_TESTING are turned off .
Turn on VTK_Group_Rendering and VTK_Group_StandAlone .

Once these variables have been set, Configure again. If the ā€œGenerateā€ button is still grayed out, click ā€œConfigureā€ yet again. Finally, you should be able to generate the build environment (i.e., on Windows you ā€œGenerateā€ button).
On Windows, this will create a Visual Studio workspace solution named VTK.sln , in your ā€˜VTKBin’ folder, that can be used for the build. Open up VTK.sln and then compile/build it using the ā€˜All Build’ option for the ā€˜ALL_BUILD’ target inside it.

My question appears here: when I compiled and builded ā€˜ALL_BUILD’, it always shows a window and says ā€œALL_BUILDā€ access denied. However there is no error shows in Visual Studio. Can anyone help me find out what’s wrong with the access? Thank you.

Hi, IMO a better question is why you want to use ALL_BUILD option? To minimize possible error paths, you should just build things that you need.

You normally build the ALL_BUILD project, so that is fine.

You get the ā€œaccess deniedā€ error if you attempt to run the project. Choose an executable project, such as a tests or an examples, as startup project; or set a valid executable file name in ALL_BUILD project properties / Debugging / Command.

1 Like

Thank you. I think that is the problem.