Hi,<br><br>I'm having problems linking my project (outside of the llvm source tree) to the LLVM jit.  My CMake file contains:<br>------------<br>find_package(LLVM REQUIRED)<br><br>include_directories(${LLVM_INCLUDE_DIR})<br>
<br>link_directories(${LLVM_LINK_DIR})<br><br>add_definitions(-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS)<br><br>add_executable(nvm main.cpp)<br><br>llvm_config(nvm engine)<br>------------<br>cmake succeeds in generating the makefile - so it is correctly finding the installed LLVM (2.8, r122491), which compiled fine.  <br>
<br>The build fails, complaining of:<br><br>CMakeFiles/nvm.dir/main.cpp.o: In function `global constructors keyed to main':<br>main.cpp:(.text+0x41): undefined reference to `LLVMLinkInJIT'<br>CMakeFiles/nvm.dir/main.cpp.o: In function `main':<br>
main.cpp:(.text+0x55): undefined reference to `LLVMInitializeX86TargetInfo'<br>main.cpp:(.text+0x5a): undefined reference to `LLVMInitializeX86Target'<br>...<br><br>When I try "jit" in place of "engine" in llvm_config, it complains that "jit" is not an llvm component.  Is there a straight-forward tutorial on how to use CMake with LLVM?  (I noticed <a href="http://llvm.org/docs/CMake.html">llvm.org/docs/CMake.html</a>, which appears to be fairly old)<br>
<br>I'm on Ubuntu 10.10, GCC version 4.4.5, LLVM 2.8 r122491 (from last night).<br><br><br>Thanks,<br><br>Joshua<br>