Search code examples
visual-studio-2019plcwdktwincat

Twincat C++ - Visual studio configuration error


I am trying to write C++ projects in Twincat, but I get the following error during building.
enter image description here
I have followed the steps mentioned here till the end and has configured WINDDK7 variable in my system environment settings. I do not understand why the build throws error even though the configuration is correct. Can somebody please help?

P.S I am a beginner in Twincat.


Solution

  • What version of TwinCAT are you working with?

    As described on this page, the WDK only needs to be installed for 4022 or earlier versions of TwinCAT.

    WDK installation only up to TwinCAT 3.1 Build 4022: The installation of the WDK described here is only necessary up to TwinCAT 3.1. Build 4022. From Build 4024.0, either the WDK must be uninstalled or the previously set system variable WINDDK7 must be renamed so that TwinCAT ignores the WDK.

    The error message also provides some valid information, You can disable the WDK requirement for certain projects under the configuration options for the C++ Project: Location to disable WDK build