(no subject)

This is my first post so not sure I’ve done everything right.

Just started playing with LLVM on Windows 7, VS C++.
Was trying to play with the example 4 and got the following error:

*"LLVM ERROR: Incompatible object format"*
 
*I was able resolve the problem by following the suggestion found here:*
[http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-December/068395.html](http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-December/068395.html)
 
This issue seems to be an old one and it is now resurfacing?
Or was there anything I did wrong?

If you’re running code under the JIT, it has a dynamic loader for ELF but not COFF object format , so you’ll need to produce ELF objects. As the default under Windows is COFF you’ll need to add -elf to the triple.

+llvmdev

Yes, the best solution would be to support COFF dynamic loading so you could load COFF object files from disk as well as JITed ones and run them together.

Otherwise, you need to add -elf to the triple. Patching getProcessTriple() would work but it’s not the correct way, the change should be local, use EngineBuilder::setMArch.

Yaron