cargo在windows系统下编译成exe,用everything搜索路径

用户: Terminal#95-140 (错误信息显示 Everything SDK DLL 找不到)

复制代码
PS D:\code\ai\obscura> python -m mcp_server_everything_search 
Failed to load Everything SDK DLL: Could not find module 'D:\dev\tools\Everything-SDK\dll\Everything64.dll'

我 : DLL 实际在 D:\install\apply\Everything-SDK\dll\Everything64.dll,但代码在找 D:\dev\tools\Everything-SDK\dll\Everything64.dll。路径是通过免费云服务器的环境变量 EVERYTHING_SDK_PATH 配置的。


用户 : D:\install\apply\Everything-SDK\dll\Everything64.dll 应当在这里,怎么解决?

我 : 设置环境变量 EVERYTHING_SDK_PATH = D:\install\apply\Everything-SDK\dll\Everything64.dll


用户: EVERYTHING_SDK_PATH 三丰云环境变量设置好了,检查是什么

我: 检查结果:

  • 环境变量已设置为:D:\install\apply\Everything-SDK\dll\Everything64.dll
  • DLL 文件存在

需要新终端或手动设置环境变量后运行。


用户: 测试everything能否搜到cl.exe

我 : 搜索结果 - 找到 43 个 cl.exe 文件,包括:

  • VS 2022 BuildTools: D:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\cl.exe
  • VS 2022 Community: D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\cl.exe

用户 : https://github.com/h4ckf0r0day/obscura 运行这个项目,缺少的编译安装工具,先用Everything搜索

我: 搜索结果汇总:

工具 状态 路径
Rust (1.94) ✅ C:\Program Files\Rust stable MSVC 1.94\bin\
CMake ✅ VS BuildTools 内置
MSVC (cl.exe) ✅ VS BuildTools 内
Ninja ✅ D:\Android\Sdk\cmake\3.22.1\bin\ninja.exe

用户: 把已经安装的编译开发工具写入 本地工具.md

我: 已创建 本地工具.md(file:///d:/code/ai/obscura/本地工具.md)


用户: 帮你运行编译

我 : 运行 cargo build --release

错误:link.exe not found - 缺少 MSVC 链接器


我: 需要设置 VS 环境变量,添加 MSVC 工具链路径到 PATH

再次编译,错误:LNK1181: 无法打开输入文件 "kernel32.lib" - 缺少 Windows SDK


用户: Windows SDK for Windows 10 2004 (10.0.19041.0) 与 Windows 10 版本 2004 一起发布... 下载哪个?

我: 建议下载 Windows SDK for Windows 10 2004 (10.0.19041.0)


用户: 继续编译

我:

  1. 确认 Windows SDK 已安装:C:\Program Files (x86)\Windows Kits\10\Lib\10.0.26100.0\um\x64\kernel32.Lib
  2. 设置环境变量后编译
  3. 编译进展,V8 下载失败(网络问题)

用户: D:\install\pro\rust\rusty_v8_release_x86_64-pc-windows-msvc.lib.gz 下载好了,继续编译运行

我:

  1. 复制 V8 库文件到 C:\Users\U937\.cargo\.rusty_v8\

  2. 配置 RUSTY_V8_ARCHIVE 环境变量

  3. 重新编译 - 成功!

    Finished release profile [optimized] target(s) in 3m 24s

相关推荐
必须得开心呀2 小时前
windows10系统任务栏图标消失修复
windows
zl_dfq3 小时前
Windows 下 UDP 套接字编程指南
网络·windows·udp
学习论之费曼学习法3 小时前
无人值守AI内容矩阵实战(10):Windows 上让 Python 进程 7×24 活着
人工智能·windows·python·矩阵·powershell·进程守护
少年的范儿4 小时前
Windows 安装 MySQL 8.4 教程(ZIP 解压版):配置 my.ini、初始化数据库与启动服务
数据库·windows·mysql
胖纸不争4 小时前
EnergyStarZ:让 Windows 后台进程给前台让路的能效管理器(v1.2 发布)
windows·性能优化·c#·win32·ef core
2501_915909066 小时前
Windows 上用 VS Code 调试 iPhone 真机 App,KXBuild 断点、崩溃定位实操
ide·windows·vscode·ios·iphone·个人开发·敏捷流程
情 九7 小时前
MCP 开发环境搭建:Mac 与 Windows 跑通 Python 服务和 stdio 客户端
windows·python·macos·mcp
懂点Tech16 小时前
ctfshow misc28:GIF 高度修改解题与脚本实现
开发语言·windows·python
云梦谭18 小时前
让 Linux 主动连接 Windows:配置 Windows 11 SSH 服务端
linux·windows·ssh
奇树谦18 小时前
Windows CMD 下 mc 运维指南:SeaweedFS 安装验收与 MinIO 数据迁移
运维·windows