Vista 上的 LLVM MinGW 安装?
从 llvm.org 我已将 llvm-2.6-x86-mingw32.tar.bz2 下载到 c 中: \llvm
和 llvm-gcc-4.2-2.6-x86-mingw32-tar.bz2 到 c:\llvm-gcc
中,并在 中设置以下批处理文件的桌面快捷方式>c:\llvm-gcc
也尝试通过 llvm-gcc 命令行设置编译环境:
@echo off
color 0E
echo Configuring LLVM environment...
set LLVM_LIB_SEARCH_PATH=%~dp0lib
set PATH=c:\llvm;%~dp0bin;%PATH%
不幸的是,在尝试编译简单的 hello 时,此设置会出现以下错误world 程序:
C:\CDev\sandbox>llvm-gcc -o hello.exe hello.c
llvm-gcc: CreateProcess: No such file or directory
我简要浏览了 LLVM 二进制文件,似乎已经包含了基于 MinGW 的 Win32 API 和运行时文件。我还尝试将 MinGW DLL 添加到 c:\llvm-gcc\bin
但无济于事。
在 Vista 上设置二进制 LLVM 环境和基于 GCC 的前端时我错过了什么?
谢谢,乔恩
From llvm.org I've downloaded llvm-2.6-x86-mingw32.tar.bz2 into c:\llvm
and llvm-gcc-4.2-2.6-x86-mingw32-tar.bz2 into c:\llvm-gcc
as well as setup a desktop shortcut the following batch file in c:\llvm-gcc
which attempts to setup an environment for compiling via the llvm-gcc
command line too:
@echo off
color 0E
echo Configuring LLVM environment...
set LLVM_LIB_SEARCH_PATH=%~dp0lib
set PATH=c:\llvm;%~dp0bin;%PATH%
Unfortunately, this setup gives the following error when trying to compile a simple hello world program:
C:\CDev\sandbox>llvm-gcc -o hello.exe hello.c
llvm-gcc: CreateProcess: No such file or directory
I've briefly looked through the LLVM binaries and it appears that the MinGW-based Win32 API and runtime files are already included. I also tried adding the MinGW DLL to c:\llvm-gcc\bin
to no avail.
What have I missed in setting up the binary LLVM environment and GCC-based front end on Vista?
Thanks, Jon
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
因为“llvm-gcc”需要 GNU/MinGW 汇编器“as”来生成 obj 文件。该问题可以通过使用以下方法解决:
Because the GNU/MinGW assembler 'as' was required by 'llvm-gcc' to generate the obj file. The problem can be solved by using:
@rwallace 是正确的,人们还需要安装 MinGW 的 binutils 以及 LLVM 二进制下载。 适当更新了 LLVM 文档
我已在http://llvm.org/docs/GettingStarted.html #安装cf
@rwallace is correct that one needs to also install MinGW's binutils along with the LLVM binary download. I've updated the LLVM documentation appropriately at
http://llvm.org/docs/GettingStarted.html#installcf
据我所知,答案是 LLVM 提供的 MinGW 发行版并不完整,特别是它没有附带“binutils”程序。
推荐的解决方案似乎是自己下载并安装 MinGW。然而,MinGW 下载页面似乎说这需要分别下载和安装 10 个不同的软件包。
我今天尝试的解决方案是使用 Qt 附带的 MinGW,它确实是在一个包中;到目前为止,这似乎有效。
As far as I can tell, the answer is that the MinGW distribution supplied by LLVM is not complete, in particular, it doesn't come with the 'binutils' programs.
The recommended solution seems to be to download and install MinGW yourself. However, the MinGW download page seems to be saying this requires 10 different packages to be downloaded and installed separately.
The solution I tried today was to use the MinGW that comes with Qt, which does come in a single package; thus far, that appears to work.
看起来它正在 C:\MinGW 中寻找基本 MinGW 安装。我今天刚刚在 msys 中使用 gcc.exe 时遇到此错误。为了解决这个问题,我创建了一个从 c:\msys 到 c:\MinGW 的符号链接,一切正常。
It seems like it is looking for the base MinGW installation in C:\MinGW. I just had this error today using gcc.exe in msys. To solve it, I created a symbolic link from c:\msys to c:\MinGW and everything worked.