[cfe-dev] Link error in Clang Visual studio 2008

Surinder surifilms at gmail.com
Mon Dec 13 16:35:36 PST 2010


Hi,

I have compiled llvm on Windows Visual Studio 2008.  The project builds
successfully.  However, on executing clang to compile a simple hello world C
program, I get following link error. (I had to add C:\Documents and
Settings\suri\llvm\bin\Debug into window path to invoke clang ).

Any help would be appreciated.

Surinder:

C:\Documents and Settings\suri\llvm\bin\Debug>clang -v foo.c
clang version 2.9 (trunk 120997)
Target: i686-pc-win32
Thread model: posix
 "C:/Documents and Settings/suri/llvm/bin/Debug/clang.exe" -cc1 -triple
i686-pc-
win32 -emit-obj -mrelax-all -disable-free -main-file-name foo.c
-mrelocation-mod
el static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -v
-resource-dir
 C:/Documents and Settings/suri/llvm/bin/Debug/../lib/clang/2.9
-ferror-limit 19
 -fmessage-length 80 -fms-extensions -fmsc-version=1300 -fgnu-runtime
-fdiagnost
ics-show-option -fcolor-diagnostics -o
C:/DOCUME~1/suri/LOCALS~1/Temp/cc-000000.
o -x c foo.c
clang -cc1 version 2.9 based upon llvm 2.9svn-r120997 hosted on
i686-pc-win32
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 C:/Documents and Settings/suri/llvm/bin/Debug/../lib/clang/2.9/include
 C:\Program Files\Microsoft Visual Studio 9.0\VC\include
 C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include
End of search list.
 "link.exe" -out:a.out -defaultlib:libcmt -nologo
C:/DOCUME~1/suri/LOCALS~1/Temp
/cc-000000.o
clang: error: unable to execute command: program not executable
clang: error: linker command failed due to signal 1 (use -v to see
invocation)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101214/3e718e29/attachment.html>


More information about the cfe-dev mailing list