<div>Here goes:</div><div><br></div><div>Linking CXX executable ..\braceless0.exe</div><div>clang version 3.2 (trunk 157524)</div><div>Target: x86_64-w64-mingw32</div><div>Thread model: posix</div><div> "c:/Mingw64/bin/x86_64-w64-mingw32-g++.exe" -v -O3 -D NDEBUG "-Lc:\\Synology\\clang-3.2-WIN64\\lib" -m64 -o "..\\braceless0.exe" CM</div>
<div>akeFiles/braceless0.dir/Braceless.cpp.obj "..\\libAST.a" "..\\libCompiler.a" "..\\libDriver.a" "..\\libBackend.a" "..\\libFrontend.a" "..\\libToolbox.a" -lLLVMAsmParser -lLLVMInstrumentation -lLLVMLinker -lLLVMArchive -lLLVMBitReader -lLLVMDebugInfo -lLLVMJIT -lLLVMVectorize -LLVMBitWriter -lLLVMTableGen -lLLVMCppBackendCodeGen -lLLVMCppBackendInfo -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -LLVMInterpreter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMMCJIT -LLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -lDbgHelp -lPsapi -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32</div>
<div>Using built-in specs.</div><div>COLLECT_GCC=c:/Mingw64/bin/x86_64-w64-mingw32-g++.exe</div><div>COLLECT_LTO_WRAPPER=c:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.7.1/lto-wrapper.exe</div><div>Target: x86_64-w64-mingw32</div>
<div>Configured with: /home/drangon/work/mingw-w64-dgn/source/gcc/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disab</div><div>le-nls --enable-languages=c,c++,objc,obj-c++ --with-gmp=/home/drangon/work/mingw-w64-dgn/build/for_target --enable-twoprocess --disa</div>
<div>ble-libstdcxx-pch --disable-win32-registry --prefix=/home/drangon/work/mingw-w64-dgn/target --with-sysroot=/home/drangon/work/mingw-</div><div>w64-dgn/target</div><div>Thread model: win32</div><div>gcc version 4.7.1 20120524 (prerelease) (GCC)</div>
<div><div>4-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/bin/</div><div>LIBRARY_PATH=c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/;c:/mingw64/bin/../lib/gcc/;c:/mingw64/bin/../lib/gcc/x86_64-w64-min</div><div>gw32/4.7.1/../../../../x86_64-w64-mingw32/lib/../lib/;c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../lib/;c:/mingw64</div>
<div>/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/lib/;c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../.</div><div>./../</div><div>COLLECT_GCC_OPTIONS='-v' '-O3' '-D' 'NDEBUG' '-Lc:\Synology\clang-3.2-WIN64\lib' '-m64' '-o' '..\braceless0.exe' '-shared-libgcc' '-</div>
<div>mtune=generic' '-march=x86-64'</div><div> c:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.7.1/collect2.exe --sysroot=/home/drangon/work/mingw-w64-dgn/target -m i386pep -Bdynamic -o ..\braceless0.exe c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/lib/../lib/crtbegin.o -Lc:\Synology\clang-3.2-WIN64\lib -c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1 -Lc:/mingw64/bin/../lib/gcc -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/lib/../lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../.. CMakeFiles/braceless0.dir/Braceless.cpp.obj ..\libAST.a ..\libCompiler.a ..\libDriver.a ..\libBackend.a ..\libFrontend.a ..\libToolbox.a -lLLVMAsmParser -lLLVMInstrumentation -lLLVMLinker -lLLVMArchive -lLLVMBitReader -lLLVMDebugInfo -lLLVMJIT -LLVMVectorize -lLLVMBitWriter -lLLVMTableGen -lLLVMCppBackendCodeGen -lLLVMCppBackendInfo -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -LLVMInterpreter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMMCJIT -LLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -lDbgHelp -lPsapi -lkernel32 -user32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/lib/../lib/crtend.o</div>
<div>c:\Synology\clang-3.2-WIN64\lib/libLLVMJIT.a(JIT.cpp.obj):JIT.cpp:(.text$_ZN4llvm15SmallVectorImplINS_15TargetAlignElemEEaSERKS2_[ll</div><div>vm::SmallVectorImpl<llvm::TargetAlignElem>::operator=(llvm::SmallVectorImpl<llvm::TargetAlignElem> const&)]+0x0): multiple definitio</div>
<div>n of `llvm::SmallVectorImpl<llvm::TargetAlignElem>::operator=(llvm::SmallVectorImpl<llvm::TargetAlignElem> const&)'</div></div><div><br></div><div>I'm wondering if it can be related to the Drangon v4.7.1 release of Mingw64 that I am using? It is apparently a prerelease, although it works fine for my program. In any event, I'd be the last to be surprised if it is simply me doing something wrong...</div>
<div><br></div><div><br></div><div>Cheers,</div><div>Mikael</div><div>-- Love Thy Frog, Dammit!</div><br><div class="gmail_quote">2012/6/11 Justin Holewinski <span dir="ltr"><<a href="mailto:justin.holewinski@gmail.com" target="_blank">justin.holewinski@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div class="im">On Mon, Jun 11, 2012 at 7:57 AM, Mikael Lyngvig <span dir="ltr"><<a href="mailto:mikael@lyngvig.org" target="_blank">mikael@lyngvig.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<div><br></div><div>Here's the linker command that CMake uses:</div>
<div><span style="font-size:12pt;font-family:'Courier New'"><br></span></div><div><span style="font-size:12pt;font-family:'Courier New'">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 </span></div>
<div><div style="font-size:12pt;font-family:'Courier New'"><pre>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.</pre>
<pre><br></pre></div></div></blockquote></div><div>Add -v to your CMAKE_CXX_FLAGS. </div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:'Courier New'">
<pre></pre></div></div><div>Cheers,</div><div><div>Mikael<br>-- Love Thy Frog! <br></div><div><div><div class="gmail_quote">2012/6/11 Anton Korobeynikov <span dir="ltr"><<a href="mailto:anton@korobeynikov.info" target="_blank">anton@korobeynikov.info</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>> I don't think that's the issue here. CMake happily tries to link with the<br>
> mingw libs,<br>
</div>Right, but it seems via MS link...<br>
<div><div><br>
--<br>
With best regards, Anton Korobeynikov<br>
Faculty of Mathematics and Mechanics, Saint Petersburg State University<br>
</div></div></blockquote></div><br>
</div></div></div>
</blockquote></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>
</font></span></blockquote></div><br>