如何在Windows上从命令行运行clang? [英] How run clang from command line on Windows?

查看:260
本文介绍了如何在Windows上从命令行运行clang?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在上周Going Native会议上,Chandler Carruth宣布存在用于在Windows上运行cl的预构建二进制文件。相同的信息位于博客文章此处

At the Going Native conference last week, Chandler Carruth announced the existence of prebuilt binaries for running clang on windows. The same information is in a blog post here. The intended audience for this is users of Visual Studio, but I want to run clang from the command line.

我运行安装程序并添加了LLVM bin 目录到我的路径,但是当我尝试编译Hello world时,我得到:

I ran the installer and added the LLVM bin directory to my path, but when I try to compile "Hello world", I get this:

C:\>clang hello.cpp
hello.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^
1 error generated.

我找不到任何有关如何配置在Windows上运行clang的信息, m猜测,在我弄清楚如何告诉ang在哪里搜索标准库头文件,我必须告诉它在哪里寻找库链接。

I can't find any information on how to configure things to run clang on Windows, and I'm guessing that after I figure out how to tell clang where to search for standard library headers, I'll have to tell it where to look for libraries to link with. Can somebody walk me through the setup step by step or point me to such a walkthrough?

推荐答案

Clang在Windows上是一个工作,进步和Chandler Carruth在他的Going Native 2013讲话中说,iostreams是目前不工作的事情之一。

Clang on Windows is a work in progress and Chandler Carruth said in his Going Native 2013 talk that iostreams was one of the things that do not currently work.

这篇关于如何在Windows上从命令行运行clang?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆