Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

visual c++ - CMAKE, NMAKE makefiles - 'compiler cl not found' (but VS 12 generator succeeds)

The VS environment variable is set beforehand with vcvars32.bat, and VS is the only compiler that I use; the OS is win 7.

The error happens with cmake-gui; specifying the compiler with path results in error 'compiler failed to make simple test'; alternatively, cmake -i from command line succeeds initially with presenting an 'options' menu which then fails to allocate a 'cmakelists.txt' file (which is somewhere deeper in the cmake folder).

Where am I going wrong? (I continued with building the solution files from VS 12, but there's other issues.)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The answer to your question from cmake mailing list

Run cmake-gui FROM the target environment, just like you run cmake...

i.e. : type "cmake-gui" in the cmd prompt that has your stuff set up in it. Don't just launch it from a short-cut unless you're using the "Visual Studio *" generators. Those do not need any special environment. Many of the makefile ones do.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...