web-dev-qa-db-ja.com

clang / clang ++はWindowsでC / C ++ヘッダーを見つけられませんか?

1時間前に http://llvm.org/pre-releases/3.6.0/ からllvm-3.6.0-rc4-win32.exeをダウンロードしました。

「hello」を出力するだけの単純なCコードをコンパイルしようとしましたが、clang.exeがstdio.hを見つけられないため、コンパイルされませんでした。同じコードでclang-cl.exeを使用すると、機能しました。

Iostreamでもclang ++で同じ問題が発生し、GCC(4.9.1)C++ヘッダーに-Iフラグを追加します。結果は次のとおりです。

C:\Users\One\Desktop>clang++ -I c:\MinGW\x86_64-w64-mingw32\include\c++ main.cpp -lib=libstdc++

In file included from main.cpp:1:
c:\MinGW\x86_64-w64-mingw32\include\c++\iostream:38:10: fatal error:'bits/c++config.h' file not found

#include <bits/c++config.h>
1 error generated.

誰もがこれを修正する方法を知っていますか?

編集:MinGWフォルダーにbits/c ++ config.hが見つかりました。これを、-Iフラグなどに追加します。

リンクエラーが発生します:

C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lib=libstdc++
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1//libstdc++.dll.a when searching for -lstdc++
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1//libstdc++.a when searching for -lstdc++
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/\libstdc++.a when searching for -lstdc++
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/libstdc++.dll.a when searching for -lstdc++
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/libstdc++.a when searching for -lstdc++
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1\libstdc++.a when searching for -lstdc++
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1//libstdc++.dll.a when searching for -lstdc++
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1//libstdc++.a when searching for -lstdc++
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/libstdc++.dll.a when searching for -lstdc++
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/libstdc++.a when searching for -lstdc++
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lstdc++
    C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libmingw32.a when searching for -lmingw32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lmingw32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libgcc_s.a when searching for -lgcc_s
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libgcc_s.a when searching for -lgcc_s
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libgcc_s.a when searching for -lgcc_s
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lgcc_s
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1//libgcc.a when searching for -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/\libgcc.a when searching for -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/libgcc.a when searching for -lgcc
    C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1\libgcc.a when searching for -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1//libgcc.a when searching for -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/libgcc.a when searching for -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldnam
e
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libmoldname.a when searching for -lmoldnam
e
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldnam
e
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lmoldname
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libmingwex.a when searching for -lmingwex
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lmingwex
    C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libmsvcrt.a when searching for -lmsvcrt
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lmsvcrt
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libpthread.dll.a when searching for -lpthr
ead
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libpthread.a when searching for -lpthread
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libpthread.a when searching for -lpthread
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libpthread.dll.a when searching for -lpthr
ead
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libpthread.a when searching for -lpthread
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lpthread
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libadvapi32.a when searching for -ladvapi3
2
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libadvapi32.a when searching for -ladvapi3
2
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libadvapi32.a when searching for -ladvapi3
2
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -ladvapi32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libshell32.a when searching for -lshell32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libshell32.a when searching for -lshell32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libshell32.a when searching for -lshell32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lshell32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libuser32.a when searching for -luser32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libuser32.a when searching for -luser32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libuser32.a when searching for -luser32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -luser32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libkernel32.a when searching for -lkernel3
2
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libkernel32.a when searching for -lkernel3
2
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libkernel32.a when searching for -lkernel3
2
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lkernel32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libiconv.a when searching for -liconv
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libiconv.a when searching for -liconv
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libiconv.a when searching for -liconv
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -liconv
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libmingw32.a when searching for -lmingw32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lmingw32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libgcc_s.a when searching for -lgcc_s
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libgcc_s.a when searching for -lgcc_s
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libgcc_s.a when searching for -lgcc_s
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lgcc_s
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1//libgcc.a when searching for -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/\libgcc.a when searching for -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/libgcc.a when searching for -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1\libgcc.a when searching for -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1//libgcc.a when searching for -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/libgcc.a when searching for -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lgcc
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldnam
e
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libmoldname.a when searching for -lmoldnam
e
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldnam
e
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lmoldname
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libmingwex.a when searching for -lmingwex
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lmingwex
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib\libmsvcrt.a when searching for -lmsvcrt
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: skipping incompatible C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9
.1/../../../../x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: cannot find -lmsvcrt
collect2.exe: error: ld returned 1 exit status
clang++.exe: error: linker (via gcc) command failed with exit code 1 (use -v to
see invocation)

なぜこれすべて? clangを機能させるために、常にこれらすべてを作成する必要があります。

15
CodeMan

これを試してください

Clang 3.5 for Windowsのインストール

よろしく。

4
Ahmed T. Ali

それを行うための現在の方法は...

求められたら、デフォルトのパス。両方をシステムパスに配置します(すべてのユーザーがアクセスできます)。 Clangインストーラーは、要求された場合にclangをパスに配置します。Mingwの場合、手動で実行する必要があります。 PathEditor2 をお勧めします。 Mingwの現在のバージョンでは、パスに追加するディレクトリはC:\Program Files\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev0\mingw64\binです。

次に、Clangを呼び出すときは、...を使用します。

clang -target x86_64-pc-windows-gnu test.c -otest.exe

Clangはパスを検索して、Mingwヘッダーとライブラリを見つけます。パスにバージョンが1つしかないことを確認してください。

3
burito

Llvm.org/docs/GettingStartedVS.htmlで説明されているように、Clangのテストを実行しようとしました。その手順は、stdio.hが見つからなかったことを示す同様の理由で失敗しました。別のマシンにインストールしようとすると、成功しました。リンクプロセスの詳細な説明に「-v」フラグを使用して、マシン間の違いを特定するために、いくつかの詳細な実行を実行しました。

作業中のインストールでは、パス変数にWindows System32ディレクトリ(C:\ Windows\System32)のデフォルトのマッピングがあることがわかりました。障害が発生したマシンには、そのパスがマップされていませんでした。障害が発生したマシンへのパスを追加すると、すべてが機能しました。

これは、セキュリティ上の理由からシステム管理者によって実装された変更である可能性があります。パスの追加が許可されていない場合は、含める各ファイルのclangコマンドに「-isystemC:\ file\location\here」を追加します。

0
BSD