Cursor seems to not inherit environment variables in the same way as VS Code. When developing in Microsoft C++, the recommended way to ensure that the environment variables are set is to launch VS Code from a
Developer Command Prompt for Visual Studio
. This works for VS Code but does not work for Cursor.
(See Configure VS Code for Microsoft C++ if the following steps are not sufficiently detailed)
- Install the C/C++ extension for VS Code
- Install the Microsoft Visual C++ (MSVC) compiler toolset
- Run Cursor from a
Developer Command Prompt for Visual Studio
- Create a .cpp file:
#ifndef WIN32
#error "WIN32 must be defined for this code to compile"
#endif
Note the intellisense error. It does not occur in VS Code.
Windows, 0.47.8
This issue prevents me from using cursor