I am trying to compile a C file in Windows console with 'cl'. When I first tried this, It send a message like this :
fatal error C1083 : ... 'stdio.h' : No such file or Directory.
So I searched web and found some article execute vcvars64.bat and try again. I followed that advise and it works nice. But whenever I reopen terminal it prints same error message what I had in very first time.
Should I execute vcvars64.bat every time, whenever I try to compile in Windows console?
PS. My command was
cl Helloworld.c -Fehello.dll -MD -LD
You can configure a shortcut to invoke cmd.exe
with a list of startup commands. Create a shortcut to cmd.exe
, then edit its "Shortcut->Target" in "Command Prompt Properties" to be cmd.exe /K C:\path\to\file.cmd
. Within C:\path\to\file.cmd
you can put the call to invoke vcvars and any other setup you want to do every time.
Then you can invoke the shortcut instead of cmd.exe
whenever you need to do command-line VS stuff.