CMake says c compiler is broken

十年热恋 提交于 2019-12-22 15:26:15

问题


I've just attempted to use Firebreath and have followed their video tutorial for Windows and come across the error that says:

Check for working C compiler using Visual Studio 10 -- broken

And then says:

It fails with following output: Change Dir:

And then lists the drive. This happens when running prep2010.cmd. I have found a post about it, but the forums won't let me log in and there is no answer. It's here: http://forum.firebreath.org/topic/274/?page=1#post-1117 and is exactly the same error, I believe. The last post talks about running prep2010 from inside the vs2010 command shell. What does that mean?

Has anyone else had this error or know how it is caused? I have no idea how to approach it.

Thankyou


回答1:


I know this is really old.. but in case someone else has this problem, the solution for me was to install service pack 1 for visual studio 2010




回答2:


As I said in the comment above, this is not "FireBreath" that is saying your compiler is broken; the prep command uses CMake to generate the project files, and it is from cmake that the error comes.

In your start menu where Visual Studio 2010 is there should be a "tools" or "utilities" subfolder and in there somewhere there is a "Visual Studio 2010 Command Prompt" link. That starts a command prompt with environment variables and path set up so that the vs2010 commands are all available. The error you're seeing is indicating that for whatever reason, CMake is unable to find visual studio 2010.

I don't know if using the vs2010 command prompt will help or not; it doesn't have any trouble finding vs2010 on any of my boxes. I can postulate that perhaps if you installed it to a nonstandard location, in a nonstandard way, or your registry got screwed up any of these things could potentially cause the issue that you are seeing. Also if you don't have vs2010 installed it would certainly cause this issue =]

I'd recommend first trying the vs2010 command prompt; if that doesn't work, you may have to try uninstalling and reinstalling vs2010. If that doesn't work, I'm out of ideas, and maybe someone who knows more about cmake will have a suggestion :-(




回答3:


Service pack 1: http://www.microsoft.com/en-us/download/details.aspx?id=23691

Configure cmake with generator: MSVC2010 x64




回答4:


I also had MSCV 2010 x64 on windows 7 and installing service pack one also helped. Also make sure that all your external dependancies are (x64) versions:

MSVC version: http://visual-studio-2010.en.malavida.com/

Gl&HF



来源:https://stackoverflow.com/questions/11187157/cmake-says-c-compiler-is-broken

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!