The Crystal Programming Language Forum

Looking for Help: Porting to Windows unresolved externals

Following the Porting to Windows wiki (Porting to Windows · crystal-lang/crystal Wiki · GitHub). When executing the final linker command on the Windows computer, I get 7 unresolved externals. I know just enough to be overconfident and thus dangerous. Any help/pointers to resolving this would be great.
Full command output follows (had to //cut// at signs to post):
C:\crystal>cl crystal.obj /Fecrystal src\llvm\ext\llvm_ext.obj llvm\Release\lib\LLVM*.lib pcre.lib gc.lib advapi32.lib legacy_stdio_definitions.lib libcmt.lib /F10000000
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29913 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) Incremental Linker Version 14.28.29913.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:crystal.exe
/stack:10000000
crystal.obj
src\llvm\ext\llvm_ext.obj
llvm\Release\lib\LLVMAggressiveInstCombine.lib
llvm\Release\lib\LLVMAnalysis.lib
llvm\Release\lib\LLVMAsmParser.lib
llvm\Release\lib\LLVMAsmPrinter.lib
llvm\Release\lib\LLVMBinaryFormat.lib
llvm\Release\lib\LLVMBitReader.lib
llvm\Release\lib\LLVMBitstreamReader.lib
llvm\Release\lib\LLVMBitWriter.lib
llvm\Release\lib\LLVMCFGuard.lib
llvm\Release\lib\LLVMCodeGen.lib
llvm\Release\lib\LLVMCore.lib
llvm\Release\lib\LLVMCoroutines.lib
llvm\Release\lib\LLVMCoverage.lib
llvm\Release\lib\LLVMDebugInfoCodeView.lib
llvm\Release\lib\LLVMDebugInfoDWARF.lib
llvm\Release\lib\LLVMDebugInfoGSYM.lib
llvm\Release\lib\LLVMDebugInfoMSF.lib
llvm\Release\lib\LLVMDebugInfoPDB.lib
llvm\Release\lib\LLVMDemangle.lib
llvm\Release\lib\LLVMDlltoolDriver.lib
llvm\Release\lib\LLVMDWARFLinker.lib
llvm\Release\lib\LLVMFrontendOpenMP.lib
llvm\Release\lib\LLVMFuzzMutate.lib
llvm\Release\lib\LLVMGlobalISel.lib
llvm\Release\lib\LLVMInstCombine.lib
llvm\Release\lib\LLVMInstrumentation.lib
llvm\Release\lib\LLVMipo.lib
llvm\Release\lib\LLVMIRReader.lib
llvm\Release\lib\LLVMJITLink.lib
llvm\Release\lib\LLVMLibDriver.lib
llvm\Release\lib\LLVMLineEditor.lib
llvm\Release\lib\LLVMLinker.lib
llvm\Release\lib\LLVMLTO.lib
llvm\Release\lib\LLVMMC.lib
llvm\Release\lib\LLVMMCA.lib
llvm\Release\lib\LLVMMCDisassembler.lib
llvm\Release\lib\LLVMMCParser.lib
llvm\Release\lib\LLVMMIRParser.lib
llvm\Release\lib\LLVMObjCARCOpts.lib
llvm\Release\lib\LLVMObject.lib
llvm\Release\lib\LLVMObjectYAML.lib
llvm\Release\lib\LLVMOption.lib
llvm\Release\lib\LLVMOrcError.lib
llvm\Release\lib\LLVMPasses.lib
llvm\Release\lib\LLVMProfileData.lib
llvm\Release\lib\LLVMRemarks.lib
llvm\Release\lib\LLVMScalarOpts.lib
llvm\Release\lib\LLVMSelectionDAG.lib
llvm\Release\lib\LLVMSupport.lib
llvm\Release\lib\LLVMSymbolize.lib
llvm\Release\lib\LLVMTableGen.lib
llvm\Release\lib\LLVMTableGenGlobalISel.lib
llvm\Release\lib\LLVMTarget.lib
llvm\Release\lib\LLVMTestingSupport.lib
llvm\Release\lib\LLVMTextAPI.lib
llvm\Release\lib\LLVMTransformUtils.lib
llvm\Release\lib\LLVMVectorize.lib
llvm\Release\lib\LLVMWindowsManifest.lib
llvm\Release\lib\LLVMX86AsmParser.lib
llvm\Release\lib\LLVMX86CodeGen.lib
llvm\Release\lib\LLVMX86Desc.lib
llvm\Release\lib\LLVMX86Disassembler.lib
llvm\Release\lib\LLVMX86Info.lib
llvm\Release\lib\LLVMX86Utils.lib
llvm\Release\lib\LLVMXRay.lib
pcre.lib
gc.lib
advapi32.lib
legacy_stdio_definitions.lib
libcmt.lib
crystal.obj : error LNK2019: unresolved external symbol LLVMLinkInMCJIT referenced in function .2A.LLVM.3A…3A.init_x86.3A.Nil
llvm_ext.obj : error LNK2019: unresolved external symbol LLVMInitializeMCJITCompilerOptions referenced in function LLVMExtCreateMCJITCompilerForModule
llvm_ext.obj : error LNK2019: unresolved external symbol “public: __cdecl llvm::EngineBuilder::EngineBuilder(class std::unique_ptr<class llvm::Module,struct std::default_delete >)” (??0EngineBuilder //cut//) referenced in function LLVMExtCreateMCJITCompilerForModule
llvm_ext.obj : error LNK2019: unresolved external symbol “public: __cdecl llvm::EngineBuilder::~EngineBuilder(void)” (??1EngineBuilder//cut//) referenced in function LLVMExtCreateMCJITCompilerForModule
llvm_ext.obj : error LNK2019: unresolved external symbol “public: class llvm::EngineBuilder & __cdecl llvm::EngineBuilder::setMCJITMemoryManager(class std::unique_ptr<class llvm::RTDyldMemoryManager,struct std::default_delete >)” (?setMCJITMemoryManager@EngineBuilder@llvm@@QEAAAEAV12@V?$unique_ptr//cut//) referenced in function LLVMExtCreateMCJITCompilerForModule
llvm_ext.obj : error LNK2019: unresolved external symbol “public: class llvm::TargetMachine * __cdecl llvm::EngineBuilder::selectTarget(void)” (?selectTarget//cut//) referenced in function LLVMExtCreateMCJITCompilerForModule
llvm_ext.obj : error LNK2019: unresolved external symbol “public: class llvm::ExecutionEngine * __cdecl llvm::EngineBuilder::create(class llvm::TargetMachine *)” (?create@//cut//) referenced in function LLVMExtCreateMCJITCompilerForModule
crystal.exe : fatal error LNK1120: 7 unresolved externals

I… don’t know!
It could be a mismatch between LLVM versions on the two systems.

Anyway, in case modifying the compiler on Windows isn’t actually among your goals, you can just download the pre-built binary:
https://nightly.link/crystal-lang/crystal/workflows/win/master/crystal.zip

Ah, thanks. Yes, not interested in working on the compiler. Just want to experiment with crystal coding to see how much I can do on Windows. Pre-built is what I was looking for but my google fu doesn’t seem to be what it used to be.

The download link probably isn’t very accessible through google search.

@straight-shoota Ahh, good to know it isn’t me then…