Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set proper paths for VS Command Line Compiler

I recently installed vs15 - preview (Stripped down version of visual studio 2015). I am able to compile C/C++ sources from inside the IDE, but I am not able to compile with the command line interface cl.exe. It can't find the c stdlib headers. I tried to use vcvars32.bat to set the proper reg values but seemingly it cant find the "Common Tools Folder".

"ERROR: Cannot determine the location of the VS Common Tools folder."

The script uses the env. variable "%VS150COMNTOOLS%". If I try to run "cd %VS150COMNTOOLS%" from the cmd line, it can't find the path, so this seems to be the main problem. How can manually set %VS150COMNTOOLS% to the right path? how can I set the cmd linker settings manually (Without telling the cl.exe every time I call it)?

like image 393
lambda Avatar asked Mar 01 '26 08:03

lambda


1 Answers

Okay, I solved it by adding the path to the include directories and lib directories to the env. variables as "INCLUDE", "LIB". It works now, whyever the script was not able to set those values properly. I am not fluent in reading .bat let away writing in, I assume the directory structure, which is different for the vs15 preview when compared to the full version, had not been adapted yet.

like image 58
lambda Avatar answered Mar 03 '26 08:03

lambda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!