You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行Google OR-Tools的make all时出现LNK1112错误求助

Troubleshooting Google OR-Tools "make all" Error in VS2017 x64 Native Tools Command Prompt

Hey there, let's work through this build error you're facing with Google OR-Tools. I've debugged similar issues with MSVC toolchains before, so here are targeted fixes to try:

  • Verify your command prompt and VS installation

    • Double-check you're using the x64 Native Tools Command Prompt for VS 2017 (not x86 or regular cmd). Run echo %PLATFORM% to confirm it outputs x64.
    • Open the VS 2017 Installer and ensure the Desktop development with C++ workload is fully installed, including the MSVC v141 toolset and a compatible Windows 10 SDK (10.0.17763.0 or newer is recommended).
  • Check OR-Tools version and path

    • Make sure your OR-Tools version supports VS2017: newer releases (v9.1+) dropped support for VS2017, so stick to v9.0 or older if you're stuck on VS2017.
    • Extract OR-Tools to a path with no spaces or Chinese characters (e.g., C:\ortools instead of C:\Program Files\OR Tools). Special characters often break path resolution during compilation.
  • Tweak build parameters

    • Before running make all, set the MSVC toolset version explicitly:
      set MSVC_VERSION=14.1
      
    • If the error is link-related (your truncated log hints at this), confirm all required OR-Tools libraries exist in the lib directory (like ortools.lib).
  • Clean and rebuild

    • First run make clean to wipe any corrupted temporary build files, then execute make all again. Stale objects can cause weird, hard-to-track errors.
  • Share the full error log

    • The error message you provided is cut off. If the above steps don't fix it, post the complete output—including the exact error code, missing files, or syntax issues. That will let us pinpoint the root cause faster!

内容的提问来源于stack exchange,提问作者Fugui

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 07:15:19