[cfe-dev] clang on WinXP + MinGW
Jason Sachs
jmsachs at gmail.com
Tue Mar 13 10:50:44 PDT 2012
I'm having a horrible time trying to get clang to work on Windows. I'm
on WinXP and have installed the latest version of MinGW
http://voxel.dl.sourceforge.net/project/mingw/Installer/mingw-get-inst/mingw-get-inst-20111118/mingw-get-inst-20111118.exe
Are there any prebuilt binaries of clang 3.0 or 3.1 that work with WinXP?
I tried downloading from
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/4.7.0-3/
but Windows complains that they're not valid executables (presumably
win64).
Then I tried downloading the 2.9 prebuilt binaries from
http://llvm.org/releases/download.html#2.9 and the C compiler with no
options seems to work OK:
--- begin file test.cpp ---
#include <stdio.h>
int main(int argc, char **argv)
{
printf("hi there\n");
return 0;
}
--- end file test.cpp ---
but when I go to emit LLVM output, I get this error:
C:\appl\llvm\2.9\clang\bin>clang -I c:\appl\mingw\20111118\include test.cpp
C:\appl\llvm\2.9\clang\bin>clang -I c:\appl\mingw\20111118\include
test.cpp -emit-llvm
clang: error:
'i386-pc-mingw32':
unable
to
pass
LLVM
bit-code
files
to
linker
How do I fix this? There's nothing I could find online that describes
what to do about this error; I don't know which environment variables
I need to set up propertly, if any.
--Jason
More information about the cfe-dev
mailing list