Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LLVM MinGW installation on Vista?

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

like image 651
Jon Avatar asked Jan 29 '26 03:01

Jon


2 Answers

Because the GNU/MinGW assembler 'as' was required by 'llvm-gcc' to generate the obj file. The problem can be solved by using:

  1. Install GNU/MinGW binutils, extract the as.exe into c:\llvm-gcc\bin
  2. Install a full MinGW package, add %MinGW%\bin your %PATH%
like image 87
Yi Zhao Avatar answered Jan 31 '26 17:01

Yi Zhao


@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

like image 32
Jon Avatar answered Jan 31 '26 17:01

Jon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!