The 2 ways of building for Windows

From what I've read, you can build/use LLVM+clang via Visual Studio or via MinGW. So far, I've only managed to have my code working via MinGW.

However, most of my users compile using Visual Studio. Can LLVM that was compiled using MinGW (or using the pre-built MinGW binary) be linked against using Visual Studio (or, more specifically, using Visual Studio's "cl" compiler and "link" linker)?

In my first attempt, I get an error message like:

libLLVMX86CodeGen.a(X86TargetMachine.o) : fatal error LNK1143: invalid or corrupt file: no symbol for COMDAT section 0x6E

- Paul

"Paul J. Lucas" <paul@lucasmail.org> writes:

[snip]

However, most of my users compile using Visual Studio. Can LLVM that
was compiled using MinGW (or using the pre-built MinGW binary) be
linked against using Visual Studio (or, more specifically, using
Visual Studio's "cl" compiler and "link" linker)?

No. MinGW's g++ and Visual Studio's cl use different C++ ABIs.

[snip]