[cfe-users] clang++.exe?==?utf-8?q? : requires a Visual Studio installation?

mayuresh@kathe.in via cfe-users cfe-users at lists.llvm.org
Wed Aug 5 05:54:18 PDT 2020


Hello,

I just installed Clang-LLVM-10.0.0 for x64 Windows and tried to compile a simple program (pasted below) using "clang++.exe hello.cpp" but got an error stating; clang++: warning: unable to find a Visual Studio installation; try running Clang from a developer command prompt [-Wmsvc-not-found]
.\hello.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
1 error generated.

//-- simple program below --
#include <iostream>

using namespace std;

int main(int argc, char* argv[]) {
	if(argc < 2) {
		cout << "Hello, world!" << endl;
	} else {
		cout << "Hello, " << argv[1] << "!" << endl;
	}

	return 0;
}

Is there any way to use Clang-LLVM without having to install Visual Studio (which is a 7.5GB download)?

Thanks,

~Mayuresh



More information about the cfe-users mailing list