[cfe-dev] Clang-interpreter and JIT on Win32/MSVC

Dean Pavlekovic dpavlekovic at gmail.com
Thu Oct 6 02:50:40 PDT 2011


Hello,

In clang-interpreter example JIT (ExecutionEngine::JITCtor) is not
initialized, making program always fail with "unable to make execution
engine: JIT has not been linked in."
Adding #include "llvm/ExecutionEngine/JIT.h" to
clang-interpreter:main.cpp solves the problem (based on a comment in
llvm/ExecutionEngine/JIT.h stating "This file forces the JIT to link
in on certain operating systems (Windows))

Cheers,
Dean

Index: examples/clang-interpreter/main.cpp
===================================================================
--- examples/clang-interpreter/main.cpp (revision 141280)
+++ examples/clang-interpreter/main.cpp (working copy)
@@ -22,6 +22,7 @@
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Config/config.h"
+#include "llvm/ExecutionEngine/JIT.h"
 #include "llvm/ExecutionEngine/ExecutionEngine.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/raw_ostream.h"



More information about the cfe-dev mailing list