[cfe-dev] [LLVMdev] Clang64 on Windows using Mingw64 yields many linking errors?

Mikael Lyngvig mikael at lyngvig.org
Mon Jun 11 04:57:57 PDT 2012


Nope, I didn't include the part where it says "very long path pointing to
Mingw64 ld.exe".  So it is not related to MS tools at all.  In fact, the MS
tools are not even in the path.

Here's the linker command that CMake uses:

c:\Synology\clang-3.2-win64\bin\clang++.exe -O3 -DNDEBUG
CMakeFiles/braceless0.dir/Braceless.cpp.obj -o ..\braceless0.exe
-Lc:\Synology\clang-3.2-WIN64\lib ..\libAST.a ..\libCompiler.a
..\libDriver.a ..\libBackend.a ..\libFrontend.a ..\libToolbox.a
-lLLVMAsmParser -lLLVMInstrumentation -lLLVMLinker -lLLVMArchive
-lLLVMBitReader -lLLVMDebugInfo -lLLVMJIT -lLLVMVectorize -lLLVMBitWriter
-lLLVMTableGen -lLLVMCppBackendCodeGen -lLLVMCppBackendInfo
-lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Disassembler
-lLLVMX86AsmParser -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter
-lLLVMX86Utils -lLLVMInterpreter -lLLVMCodeGen -lLLVMScalarOpts
-lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMMCJIT
-lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMTarget -lLLVMMC -lLLVMObject
-lLLVMCore -lLLVMSupport -lDbgHelp -lPsapi -lkernel32 -luser32 -lgdi32
-lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32

I must admit that I don't know how to get Clang to display what linker
command it uses when asked to perform the link. The linker, ld.exe, is
located in the Mingw64 directory as expected.


Cheers,
Mikael
-- Love Thy Frog!
2012/6/11 Anton Korobeynikov <anton at korobeynikov.info>

> > I don't think that's the issue here.  CMake happily tries to link with
> the
> > mingw libs,
> Right, but it seems via MS link...
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120611/5a4513a2/attachment.html>


More information about the cfe-dev mailing list