Link Error with MSVC

Issue #21 new
Jan Grau
created an issue

I'm getting a link error using llvm-sys:

     Running `rustc --crate-name hello_llvm src\main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=6ebbeed25c5b7ded -C extra-filename=-6ebbeed25c5b7ded --out-dir D:\Dev\Programming\Rust\hello-llvm\target\debug\deps -L dependency=D:\Dev\Programming\Rust\hello-llvm\target\debug\deps --extern llvm_sys=D:\Dev\Programming\Rust\hello-llvm\target\debug\deps\libllvm_sys-7f9d71e2d53eb047.rlib -L native=D:\Programme\LLVM-5.0.0\lib -L native=D:\Dev\Programming\Rust\hello-llvm\target\debug\build\llvm-sys-acad4a8047459ce3\out`
error: linking with `link.exe` failed: exit code: 1120
  |
  = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.11.25503\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\Dev\\Programming\\Rust\\hello-llvm\\target\\debug\\deps\\hello_llvm-6ebbeed25c5b7ded.0.o" "/OUT:D:\\Dev\\Programming\\Rust\\hello-llvm\\target\\debug\\deps\\hello_llvm-6ebbeed25c5b7ded.exe" "D:\\Dev\\Programming\\Rust\\hello-llvm\\target\\debug\\deps\\hello_llvm-6ebbeed25c5b7ded.crate.allocator.o" "/OPT:REF,NOICF" "/DEBUG" "/LIBPATH:D:\\Dev\\Programming\\Rust\\hello-llvm\\target\\debug\\deps" "/LIBPATH:D:\\Programme\\LLVM-5.0.0\\lib" "/LIBPATH:D:\\Dev\\Programming\\Rust\\hello-llvm\\target\\debug\\build\\llvm-sys-acad4a8047459ce3\\out" "/LIBPATH:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\Dev\\Programming\\Rust\\hello-llvm\\target\\debug\\deps\\libllvm_sys-7f9d71e2d53eb047.rlib" "D:\\Dev\\Programming\\Rust\\hello-llvm\\target\\debug\\deps\\liblibc-ca721c75b1428a09.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-dd7c96bff832962e.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-5fee394736e5c5eb.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-9027c96a793ab959.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-d67437f4f22ef3c2.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc_system-c0ca30c8d8f2ee24.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-db87982aeb7cd775.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_unicode-9ffbffc259cf112a.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librand-a299d02141336ab8.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-e56c10976581c51e.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-4f8e9eb49e791bd8.rlib" "psapi.lib" "shell32.lib" "ole32.lib" "uuid.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "shell32.lib" "msvcrt.lib"
  = note: hello_llvm-6ebbeed25c5b7ded.0.o : error LNK2019: unresolved external symbol LLVMContextCreate referenced in function _ZN10hello_llvm4main17h193ec55dcae74280E
          hello_llvm-6ebbeed25c5b7ded.0.o : error LNK2019: unresolved external symbol LLVMContextDispose referenced in function _ZN10hello_llvm4main17h193ec55dcae74280E
          D:\Dev\Programming\Rust\hello-llvm\target\debug\deps\hello_llvm-6ebbeed25c5b7ded.exe : fatal error LNK1120: 2 unresolved externals


error: aborting due to previous error

error: Could not compile `hello-llvm`.

Caused by:
  process didn't exit successfully: `rustc --crate-name hello_llvm src\main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=6ebbeed25c5b7ded -C extra-filename=-6ebbeed25c5b7ded --out-dir D:\Dev\Programming\Rust\hello-llvm\target\debug\deps -L dependency=D:\Dev\Programming\Rust\hello-llvm\target\debug\deps --extern llvm_sys=D:\Dev\Programming\Rust\hello-llvm\target\debug\deps\libllvm_sys-7f9d71e2d53eb047.rlib -L native=D:\Programme\LLVM-5.0.0\lib -L native=D:\Dev\Programming\Rust\hello-llvm\target\debug\build\llvm-sys-acad4a8047459ce3\out` (exit code: 101)

I've compiled LLVM 5.0 with MSVC on Windows and using this Rust toolchain: stable-x86_64-pc-windows-msvc. My LLVM prefix is this: D:\Programme\LLVM-5.0.0

How can I resolve this issue?

Comments (6)

  1. Jan Grau reporter

    Thanks for your response.

    This is what I get:

       Compiling llvm-sys v50.0.0
         Running `rustc --crate-name build_script_build C:\Users\JPG\.cargo\registry\src\github.com-1ecc6299db9ec823\llvm-sys-50.0.0\build.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=de323d334ed78494 -C extra-filename=-de323d334ed78494 --out-dir D:\Dev\Programming\Rust\hello-llvm\target\debug\build\llvm-sys-de323d334ed78494 -L dependency=D:\Dev\Programming\Rust\hello-llvm\target\debug\deps --extern gcc=D:\Dev\Programming\Rust\hello-llvm\target\debug\deps\libgcc-2303dd67c92ba483.rlib --extern lazy_static=D:\Dev\Programming\Rust\hello-llvm\target\debug\deps\liblazy_static-5c1a2223aa2d206a.rlib --extern regex=D:\Dev\Programming\Rust\hello-llvm\target\debug\deps\libregex-88ce5caadb273105.rlib --extern semver=D:\Dev\Programming\Rust\hello-llvm\target\debug\deps\libsemver-03d44c18bcfce35d.rlib --cap-lints allow`
         Running `D:\Dev\Programming\Rust\hello-llvm\target\debug\build\llvm-sys-de323d334ed78494\build-script-build`
         Running `rustc --crate-name llvm_sys C:\Users\JPG\.cargo\registry\src\github.com-1ecc6299db9ec823\llvm-sys-50.0.0\src\lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=7f9d71e2d53eb047 -C extra-filename=-7f9d71e2d53eb047 --out-dir D:\Dev\Programming\Rust\hello-llvm\target\debug\deps -L dependency=D:\Dev\Programming\Rust\hello-llvm\target\debug\deps --extern libc=D:\Dev\Programming\Rust\hello-llvm\target\debug\deps\liblibc-ca721c75b1428a09.rlib --cap-lints allow -L native=D:\Programme\LLVM-5.0.0\lib -L native=D:\Dev\Programming\Rust\hello-llvm\target\debug\build\llvm-sys-acad4a8047459ce3\out -l static=LLVMInterpreter -l static=LLVMCoroutines -l static=LLVMObjectYAML -l static=LLVMXCoreDisassembler -l static=LLVMXCoreCodeGen -l static=LLVMXCoreDesc -l static=LLVMXCoreInfo -l static=LLVMXCoreAsmPrinter -l static=LLVMSystemZDisassembler -l static=LLVMSystemZCodeGen -l static=LLVMSystemZAsmParser -l static=LLVMSystemZDesc -l static=LLVMSystemZInfo -l static=LLVMSystemZAsmPrinter -l static=LLVMSparcDisassembler -l static=LLVMSparcCodeGen -l static=LLVMSparcAsmParser -l static=LLVMSparcDesc -l static=LLVMSparcInfo -l static=LLVMSparcAsmPrinter -l static=LLVMPowerPCDisassembler -l static=LLVMPowerPCCodeGen -l static=LLVMPowerPCAsmParser -l static=LLVMPowerPCDesc -l static=LLVMPowerPCInfo -l static=LLVMPowerPCAsmPrinter -l static=LLVMNVPTXCodeGen -l static=LLVMNVPTXDesc -l static=LLVMNVPTXInfo -l static=LLVMNVPTXAsmPrinter -l static=LLVMMSP430CodeGen -l static=LLVMMSP430Desc -l static=LLVMMSP430Info -l static=LLVMMSP430AsmPrinter -l static=LLVMMipsDisassembler -l static=LLVMMipsCodeGen -l static=LLVMMipsAsmParser -l static=LLVMMipsDesc -l static=LLVMMipsInfo -l static=LLVMMipsAsmPrinter -l static=LLVMLanaiDisassembler -l static=LLVMLanaiCodeGen -l static=LLVMLanaiAsmParser -l static=LLVMLanaiDesc -l static=LLVMLanaiAsmPrinter -l static=LLVMLanaiInfo -l static=LLVMHexagonDisassembler -l static=LLVMHexagonCodeGen -l static=LLVMHexagonAsmParser -l static=LLVMHexagonDesc -l static=LLVMHexagonInfo -l static=LLVMBPFDisassembler -l static=LLVMBPFCodeGen -l static=LLVMBPFDesc -l static=LLVMBPFInfo -l static=LLVMBPFAsmPrinter -l static=LLVMARMDisassembler -l static=LLVMARMCodeGen -l static=LLVMARMAsmParser -l static=LLVMARMDesc -l static=LLVMARMInfo -l static=LLVMARMAsmPrinter -l static=LLVMAMDGPUDisassembler -l static=LLVMAMDGPUCodeGen -l static=LLVMAMDGPUAsmParser -l static=LLVMAMDGPUDesc -l static=LLVMAMDGPUInfo -l static=LLVMAMDGPUAsmPrinter -l static=LLVMAMDGPUUtils -l static=LLVMAArch64Disassembler -l static=LLVMAArch64CodeGen -l static=LLVMAArch64AsmParser -l static=LLVMAArch64Desc -l static=LLVMAArch64Info -l static=LLVMAArch64AsmPrinter -l static=LLVMAArch64Utils -l static=LLVMLTO -l static=LLVMPasses -l static=LLVMObjCARCOpts -l static=LLVMipo -l static=LLVMInstrumentation -l static=LLVMVectorize -l static=LLVMLinker -l static=LLVMIRReader -l static=LLVMMIRParser -l static=LLVMAsmParser -l static=LLVMX86Disassembler -l static=LLVMX86AsmParser -l static=LLVMMCJIT -l static=LLVMSymbolize -l static=LLVMDebugInfoPDB -l static=LLVMDebugInfoDWARF -l static=LLVMTableGen -l static=LLVMX86CodeGen -l static=LLVMGlobalISel -l static=LLVMX86Desc -l static=LLVMX86Info -l static=LLVMMCDisassembler -l static=LLVMX86AsmPrinter -l static=LLVMX86Utils -l static=LLVMSelectionDAG -l static=LLVMAsmPrinter -l static=LLVMDebugInfoCodeView -l static=LLVMDebugInfoMSF -l static=LLVMCodeGen -l static=LLVMScalarOpts -l static=LLVMInstCombine -l static=LLVMBitWriter -l static=LLVMOrcJIT -l static=LLVMTransformUtils -l static=LLVMExecutionEngine -l static=LLVMTarget -l static=LLVMAnalysis -l static=LLVMRuntimeDyld -l static=LLVMLineEditor -l static=LLVMDlltoolDriver -l static=LLVMCoverage -l static=LLVMProfileData -l static=LLVMLibDriver -l static=LLVMOption -l static=LLVMObject -l static=LLVMMCParser -l static=LLVMMC -l static=LLVMBitReader -l static=LLVMCore -l static=LLVMBinaryFormat -l static=LLVMSupport -l static=LLVMDemangle -l dylib=psapi -l dylib=shell32 -l dylib=ole32 -l dylib=uuid -l static=targetwrappers`
       Compiling hello-llvm v0.1.0 (file:///D:/Dev/Programming/Rust/hello-llvm)
    
  2. Peter Marheine repo owner

    That looks like it should work.. on a Linux system I can see LLVMContextCreate in libLLVMCore.a and you're linking the same library.

    As a sanity check, can you build the examples? Try cargo run --example jit-function. Can you share the code for the program you're trying to build too?

  3. Jan Grau reporter

    This is my source code:

    extern crate llvm_sys as llvm;
    use llvm::core::*;
    
    fn main() {
        println!("Hello, world!");
    
        unsafe {
            let context = LLVMContextCreate();
    
            LLVMContextDispose(context);
        }
    }
    

    I can find the library LLVMCore at this path: D:\Programme\LLVM-5.0.0\lib\LLVMCore.lib.

    Unfortunately I can't build the example either. I'm getting the same kind of link errors.

  4. Peter Marheine repo owner

    Okay, so the linker isn't picking up any functions from your LLVM, but we appear to be specifying the linker search path (-L native=D:\Programme\LLVM-5.0.0\lib) correctly and all the right libraries (-l static=LLVMCore)..

    Maybe getting the actual linker invocation rustc is using will be enlightening; you can get it from debug logs (using cmd.exe syntax to build llvm-sys only):

    > set RUST_LOG=rustc_trans::back::link=info
    > cargo build --example jit-function
    

    It's also possible your LLVM .lib files are only import libraries, which would mean final link needs to specify the LLVM libraries as well (meaning you need to be linking dynamically). You can use the MSVC lib tool to check if it's an import or full static library:

    > lib /list foo.lib
    
  5. Jan Grau reporter

    Compiling llvm-sys with this options results in this output:

       Compiling llvm-sys v50.0.0 (file:///D:/Dev/Programming/Rust/tari-llvm-sys.rs)
    INFO:rustc_trans::back::link: LinkMeta { crate_hash: Svh { hash: 12792182566672430850 } }
    INFO:rustc_trans::back::link: preparing CrateTypeExecutable from ["D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\build\\llvm-sys-b75bbfad23fa2c6e\\build_script_build-b75bbfad23fa2c6e.0.o"] to "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\build\\llvm-sys-b75bbfad23fa2c6e\\build_script_build-b75bbfad23fa2c6e.exe"
    INFO:rustc_trans::back::link: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.11.25503\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\build\\llvm-sys-b75bbfad23fa2c6e\\build_script_build-b75bbfad23fa2c6e.0.o" "/OUT:D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\build\\llvm-sys-b75bbfad23fa2c6e\\build_script_build-b75bbfad23fa2c6e.exe" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\build\\llvm-sys-b75bbfad23fa2c6e\\build_script_build-b75bbfad23fa2c6e.crate.allocator.o" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/LIBPATH:D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps" "/LIBPATH:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libregex-889a06aa0e8244e6.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libutf8_ranges-0b60f3102c02252b.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libsemver-948583922f424383.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libgcc-cbb8030b7793701f.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libaho_corasick-894ec76e8bd90a12.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libmemchr-0dcabfc5a141a5dd.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\liblibc-2b617075ddcd7131.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libthread_local-4573c804043a5b71.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\liblazy_static-0884beece8bc3e5e.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libunreachable-b15fd23fd1ee5de8.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libvoid-b83408c199610d0f.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libregex_syntax-2526e0c2f2ddcdaa.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libsemver_parser-d58545804686a5f8.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-21987e9ade021f69.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-29d6158f38a84c5f.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-d6c8212ee950c463.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-09b6e1422795dd7b.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc_system-2db463290136f98d.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-9d760f50c87565b2.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_unicode-814c9462c44e78d7.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librand-164988f0cb62f1a9.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-3ca6fddda4df5c3d.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-3d1abc484b0c6c31.rlib" "advapi32.lib" "ole32.lib" "oleaut32.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "shell32.lib" "msvcrt.lib"
    INFO:rustc_trans::back::link: linker stderr:
    
    INFO:rustc_trans::back::link: linker stdout:
    
    warning: variant `LLVM_LTO_UNKNOWN` should have a camel case name such as `LlvmLtoUnknown`
      --> src\link_time_optimizer.rs:10:5
       |
    10 |     LLVM_LTO_UNKNOWN = 0,                                                                                             |     ^^^^^^^^^^^^^^^^^^^^
       |
       = note: #[warn(non_camel_case_types)] on by default
    
    warning: variant `LLVM_LTO_OPT_SUCCESS` should have a camel case name such as `LlvmLtoOptSuccess`
      --> src\link_time_optimizer.rs:11:5
       |
    11 |     LLVM_LTO_OPT_SUCCESS = 1,
       |     ^^^^^^^^^^^^^^^^^^^^^^^^
    
    warning: variant `LLVM_LTO_READ_SUCCESS` should have a camel case name such as `LlvmLtoReadSuccess`
      --> src\link_time_optimizer.rs:12:5
       |
    12 |     LLVM_LTO_READ_SUCCESS = 2,
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^
    
    warning: variant `LLVM_LTO_READ_FAILURE` should have a camel case name such as `LlvmLtoReadFailure`
      --> src\link_time_optimizer.rs:13:5
       |
    13 |     LLVM_LTO_READ_FAILURE = 3,
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^
    
    warning: variant `LLVM_LTO_WRITE_FAILURE` should have a camel case name such as `LlvmLtoWriteFailure`
      --> src\link_time_optimizer.rs:14:5
       |
    14 |     LLVM_LTO_WRITE_FAILURE = 4,
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                             warning: variant `LLVM_LTO_NO_TARGET` should have a camel case name such as `LlvmLtoNoTarget`                             --> src\link_time_optimizer.rs:15:5                                                                                      |                                                                                                                    15 |     LLVM_LTO_NO_TARGET = 5,                                                                                           |     ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                 warning: variant `LLVM_LTO_NO_WORK` should have a camel case name such as `LlvmLtoNoWork`                                 --> src\link_time_optimizer.rs:16:5                                                                                      |                                                                                                                    16 |     LLVM_LTO_NO_WORK = 6,                                                                                             |     ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   warning: variant `LLVM_LTO_MODULE_MERGE_FAILURE` should have a camel case name such as `LlvmLtoModuleMergeFailure`        --> src\link_time_optimizer.rs:17:5                                                                                      |                                                                                                                    17 |     LLVM_LTO_MODULE_MERGE_FAILURE = 7,                                                                                |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                      warning: variant `LLVM_LTO_ASM_FAILURE` should have a camel case name such as `LlvmLtoAsmFailure`                         --> src\link_time_optimizer.rs:18:5                                                                                      |                                                                                                                    18 |     LLVM_LTO_ASM_FAILURE = 8,                                                                                         |     ^^^^^^^^^^^^^^^^^^^^^^^^                                         
    warning: variant `LLVM_LTO_NULL_OBJECT` should have a camel case name such as `LlvmLtoNullObject`
      --> src\link_time_optimizer.rs:19:5
       |                                                                                                                    19 |     LLVM_LTO_NULL_OBJECT = 9,
       |     ^^^^^^^^^^^^^^^^^^^^^^^^
    warning: variant `LLVMLinkerPreserveSource_Removed` should have a camel case name such as `LlvmlinkerpreservesourceRemoved`
     --> src\linker.rs:9:5                                                                                                    |
    9 |     LLVMLinkerPreserveSource_Removed = 1,                                                                             |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                                                                                            warning: variant `LLVMX86_FP80TypeKind` should have a camel case name such as `Llvmx86Fp80typekind`
       --> src\lib.rs:151:5                                                                                                     |
    151 |     LLVMX86_FP80TypeKind = 4,                                                                                         |     ^^^^^^^^^^^^^^^^^^^^^^^^
                                                                                                                            warning: variant `LLVMPPC_FP128TypeKind` should have a camel case name such as `LlvmppcFp128typekind`
       --> src\lib.rs:153:5                                                                                                     |
    153 |     LLVMPPC_FP128TypeKind = 6,                                                                                        |     ^^^^^^^^^^^^^^^^^^^^^^^^^
                                                                                                                            warning: variant `LLVMX86_MMXTypeKind` should have a camel case name such as `Llvmx86Mmxtypekind`
       --> src\lib.rs:162:5                                                                                                     |
    162 |     LLVMX86_MMXTypeKind = 15,                                                                                         |     ^^^^^^^^^^^^^^^^^^^^^^^^
                                                                                                                            INFO:rustc_trans::back::link: LinkMeta { crate_hash: Svh { hash: 1224834074454963817 } }
    INFO:rustc_trans::back::link: preparing rlib from ["D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\llvm_sys-56d36eb1d36888a2.0.o"] to "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libllvm_sys-56d36eb1d36888a2.rlib"                                                                                                        INFO:rustc_trans::back::link: LinkMeta { crate_hash: Svh { hash: 12183242565369030561 } }
    INFO:rustc_trans::back::link: preparing CrateTypeExecutable from ["D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\examples\\jit_function-f415e2bd97e3fb24.0.o"] to "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\examples\\jit_function-f415e2bd97e3fb24.exe"                                                                             INFO:rustc_trans::back::link: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.11.25503\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\examples\\jit_function-f415e2bd97e3fb24.0.o" "/OUT:D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\examples\\jit_function-f415e2bd97e3fb24.exe" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\examples\\jit_function-f415e2bd97e3fb24.crate.allocator.o" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/LIBPATH:D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps" "/LIBPATH:D:\\Programme\\LLVM-5.0.0\\lib" "/LIBPATH:D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\build\\llvm-sys-25dcfaf73bf4da18\\out" "/LIBPATH:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libllvm_sys-56d36eb1d36888a2.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\liblibc-2b617075ddcd7131.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-21987e9ade021f69.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-29d6158f38a84c5f.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-d6c8212ee950c463.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-09b6e1422795dd7b.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc_system-2db463290136f98d.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-9d760f50c87565b2.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_unicode-814c9462c44e78d7.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librand-164988f0cb62f1a9.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-3ca6fddda4df5c3d.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-3d1abc484b0c6c31.rlib" "psapi.lib" "shell32.lib" "ole32.lib" "uuid.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "shell32.lib" "msvcrt.lib"                                                                                            error: linking with `link.exe` failed: exit code: 1120
      |                                                                                                                       = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.11.25503\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\examples\\jit_function-f415e2bd97e3fb24.0.o" "/OUT:D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\examples\\jit_function-f415e2bd97e3fb24.exe" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\examples\\jit_function-f415e2bd97e3fb24.crate.allocator.o" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/LIBPATH:D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps" "/LIBPATH:D:\\Programme\\LLVM-5.0.0\\lib" "/LIBPATH:D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\build\\llvm-sys-25dcfaf73bf4da18\\out" "/LIBPATH:C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\libllvm_sys-56d36eb1d36888a2.rlib" "D:\\Dev\\Programming\\Rust\\tari-llvm-sys.rs\\target\\debug\\deps\\liblibc-2b617075ddcd7131.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-21987e9ade021f69.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-29d6158f38a84c5f.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-d6c8212ee950c463.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-09b6e1422795dd7b.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc_system-2db463290136f98d.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-9d760f50c87565b2.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_unicode-814c9462c44e78d7.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librand-164988f0cb62f1a9.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-3ca6fddda4df5c3d.rlib" "C:\\Users\\JPG\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-3d1abc484b0c6c31.rlib" "psapi.lib" "shell32.lib" "ole32.lib" "uuid.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "shell32.lib" "msvcrt.lib"                                                                                                                  = note: jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMContextCreate referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                               jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMModuleCreateWithNameInContext referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                               jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMCreateBuilderInContext referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                      jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMInt64TypeInContext referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                          jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMFunctionType referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                                jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMAddFunction referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                                 jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMAppendBasicBlockInContext referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                   jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMPositionBuilderAtEnd referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                        jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMGetParam referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                                    jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMBuildAdd referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                                    jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMBuildRet referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                                    jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMDisposeBuilder referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                              jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMDumpModule referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                                  jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMLinkInMCJIT referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                                 jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMCreateExecutionEngineForModule referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                              jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMGetFunctionAddress referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                          jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMDisposeExecutionEngine referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                      jit_function-f415e2bd97e3fb24.0.o : error LNK2019: unresolved external symbol LLVMContextDispose referenced in function _ZN12jit_function4main17h1ff2bdacea7d87d5E                                                                              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeAArch64TargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                    libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeAMDGPUTargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                     libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeARMTargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                        libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeBPFTargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                        libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeHexagonTargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                    libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeLanaiTargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                      libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeMipsTargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                       libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeMSP430TargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                     libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeNVPTXTargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                      libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializePowerPCTargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                    libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeSparcTargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                      libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeSystemZTargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                    libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeX86TargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                        libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeXCoreTargetInfo referenced in function LLVM_InitializeAllTargetInfos                                                                      libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeAArch64Target referenced in function LLVM_InitializeAllTargets                                                                            libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeAMDGPUTarget referenced in function LLVM_InitializeAllTargets                                                                             libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeARMTarget referenced in function LLVM_InitializeAllTargets                                                                                libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeBPFTarget referenced in function LLVM_InitializeAllTargets                                                                                libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeHexagonTarget referenced in function LLVM_InitializeAllTargets                                                                            libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeLanaiTarget referenced in function LLVM_InitializeAllTargets                                                                              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeMipsTarget referenced in function LLVM_InitializeAllTargets                                                                               libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeMSP430Target referenced in function LLVM_InitializeAllTargets                                                                             libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeNVPTXTarget referenced in function LLVM_InitializeAllTargets                                                                              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializePowerPCTarget referenced in function LLVM_InitializeAllTargets                                                                            libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeSparcTarget referenced in function LLVM_InitializeAllTargets                                                                              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeSystemZTarget referenced in function LLVM_InitializeAllTargets                                                                            libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeX86Target referenced in function LLVM_InitializeAllTargets                                                                                libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeXCoreTarget referenced in function LLVM_InitializeAllTargets                                                                              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeAArch64TargetMC referenced in function LLVM_InitializeAllTargetMCs                                                                        libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeAMDGPUTargetMC referenced in function LLVM_InitializeAllTargetMCs                                                                         libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeARMTargetMC referenced in function LLVM_InitializeAllTargetMCs                                                                            libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeBPFTargetMC referenced in function LLVM_InitializeAllTargetMCs                                                                            libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeHexagonTargetMC referenced in function LLVM_InitializeAllTargetMCs
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeLanaiTargetMC referenced in function LLVM_InitializeAllTargetMCs
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeMipsTargetMC referenced in function LLVM_InitializeAllTargetMCs
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeMSP430TargetMC referenced in function LLVM_InitializeAllTargetMCs
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeNVPTXTargetMC referenced in function LLVM_InitializeAllTargetMCs
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializePowerPCTargetMC referenced in function LLVM_InitializeAllTargetMCs
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeSparcTargetMC referenced in function LLVM_InitializeAllTargetMCs
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeSystemZTargetMC referenced in function LLVM_InitializeAllTargetMCs
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeX86TargetMC referenced in function LLVM_InitializeAllTargetMCs
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeXCoreTargetMC referenced in function LLVM_InitializeAllTargetMCs
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeAArch64AsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeAMDGPUAsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeARMAsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeBPFAsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeHexagonAsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeLanaiAsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeMipsAsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeMSP430AsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeNVPTXAsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializePowerPCAsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeSparcAsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeSystemZAsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeX86AsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeXCoreAsmPrinter referenced in function LLVM_InitializeAllAsmPrinters
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeAArch64AsmParser referenced in function LLVM_InitializeAllAsmParsers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeAMDGPUAsmParser referenced in function LLVM_InitializeAllAsmParsers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeARMAsmParser referenced in function LLVM_InitializeAllAsmParsers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeHexagonAsmParser referenced in function LLVM_InitializeAllAsmParsers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeLanaiAsmParser referenced in function LLVM_InitializeAllAsmParsers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeMipsAsmParser referenced in function LLVM_InitializeAllAsmParsers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializePowerPCAsmParser referenced in function LLVM_InitializeAllAsmParsers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeSparcAsmParser referenced in function LLVM_InitializeAllAsmParsers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeSystemZAsmParser referenced in function LLVM_InitializeAllAsmParsers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeX86AsmParser referenced in function LLVM_InitializeAllAsmParsers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeAArch64Disassembler referenced in function LLVM_InitializeAllDisassemblers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeAMDGPUDisassembler referenced in function LLVM_InitializeAllDisassemblers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeARMDisassembler referenced in function LLVM_InitializeAllDisassemblers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeBPFDisassembler referenced in function LLVM_InitializeAllDisassemblers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeHexagonDisassembler referenced in function LLVM_InitializeAllDisassemblers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeLanaiDisassembler referenced in function LLVM_InitializeAllDisassemblers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeMipsDisassembler referenced in function LLVM_InitializeAllDisassemblers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializePowerPCDisassembler referenced in function LLVM_InitializeAllDisassemblers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeSparcDisassembler referenced in function LLVM_InitializeAllDisassemblers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeSystemZDisassembler referenced in function LLVM_InitializeAllDisassemblers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeX86Disassembler referenced in function LLVM_InitializeAllDisassemblers
              libllvm_sys-56d36eb1d36888a2.rlib(target.o) : error LNK2019: unresolved external symbol LLVMInitializeXCoreDisassembler referenced in function LLVM_InitializeAllDisassemblers
              D:\Dev\Programming\Rust\tari-llvm-sys.rs\target\debug\examples\jit_function-f415e2bd97e3fb24.exe : fatal error LNK1120: 96 unresolved externals
    
    
    error: aborting due to previous error
    
    error: Could not compile `llvm-sys`.
    

    The llvm libraries are static libraries.

  6. Log in to comment