<div dir="rtl"><div dir="ltr">I'm linking C++ code and so had not started testing cross-linking objects due to the different C++ ABI.</div><div dir="ltr">The debug information format is completely different, C and C++. </div>

<div dir="ltr">I'm not sure the import library information is the same.</div><div dir="ltr">The library support routines are different. </div><div dir="ltr">Even with C code I think there will be obstacles to linking objects from Visual C++ and MinGW. </div>

<div dir="ltr">DLLs with C interface do link OK.<br></div><div dir="ltr"><br></div><div dir="ltr">I would be interesting to see MinGW and clang converging to Visual C++ object binary compatibility at least for C code. There had been changes in this direction.</div>

<div dir="ltr"><br></div><div dir="ltr"><br></div></div><div class="gmail_extra"><div dir="ltr"><br><br><div class="gmail_quote">2014-05-08 20:08 GMT+03:00 Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0 .8ex;border-left:1px #ccc solid;border-right:1px #ccc solid;padding-left:1ex;padding-right:1ex"><div class="gmail_extra"><div class="gmail_quote"><div class="">On Thu, May 8, 2014 at 5:24 AM, Yaron Keren <span dir="ltr"><<a href="mailto:yaron.keren@gmail.com" target="_blank">yaron.keren@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="rtl"><div dir="ltr">clang can function in two different modes on Windows, MinGW compatible or Visual C++ compatible.</div>


<div dir="ltr">The object formats are not compatible.</div></div></blockquote><div><br></div></div><div>I think I know what you mean, but I wanted to clarify it a bit.</div><div><br></div><div>MinGW and MSVC differ only in the C++ ABI and in passing structs by value in C.  If you limit yourself to COM or extern "C" interfaces that don't pass things by value, you can link object code from all three compilers, MSVC, GCC, and Clang, together and it will work.  Obviously, this is too limiting for many users, so Clang has support for both MinGW and MSVC C++ ABIs now.</div>


<div><br></div><div>Is there some other object file level incompatibility that I'm forgetting, like differing .drectve contents?</div></div></div></blockquote></div></div></div>