无法在 Windows 上编译 exqlite

     2023-03-05     242

关键词:

【中文标题】无法在 Windows 上编译 exqlite【英文标题】:Cannot compile exqlite on Windows 【发布时间】:2021-11-08 09:36:37 【问题描述】:

背景

我正在尝试在我的 Windows VM 中运行这个 Elixir 桌面应用程序: https://github.com/elixir-desktop/desktop-example-app

我已经在我的 Windows 中手动安装了 Erlang OTP 24.X: https://erlang.org/download/otp_win64_24.1.4.exe

之后我通过官网安装了 Elixir,并将其配置为使用我之前提到的 Erlang/OTP 版本: https://elixir-lang.org/install.html#windows

问题

所以,我克隆了项目并照常运行mix deps.get。 之后我跑了mix deps.compile,我得到了一个错误:

λ mix deps.compile
===> Analyzing applications...
===> Compiling dbus
===> Analyzing applications...
===> Compiling ranch
===> Analyzing applications...
===> Compiling telemetry
==> exqlite
could not compile dependency :exqlite, "mix compile" failed. You can recompile this dependency with "mix deps.compile exqlite", update it with "mix deps.update exqlite" or clean it with "mix deps.clean exqlite"
** (Mix) "nmake" not found in the path. If you have set the MAKE environment variable,
please make sure it is correct.

这意味着我遇到了依赖问题:

λ mix deps.compile exqlite
==> exqlite
could not compile dependency :exqlite, "mix compile" failed. You can recompile this dependency with "mix deps.compile exqlite", update it with "mix deps.update exqlite" or clean it with "mix deps.clean exqlite"
** (Mix) "nmake" not found in the path. If you have set the MAKE environment variable,
please make sure it is correct.

我尝试了什么

所以,我猜我在 windows 上的 sqlite 安装做得不好。我已经按照本教程在 Windows 中安装了 sqlite:

https://www.tutorialspoint.com/sqlite/sqlite_installation.htm

归结为:

    转到SQLite download page,从 Windows 部分下载预编译的二进制文件。 下载sqlite-shell-win32-*.zipsqlite-dll-win32-*.zip 压缩文件。 - 创建一个文件夹C:\>sqlite 并在此文件夹中解压上面的两个压缩文件,这将为您提供sqlite3.defsqlite3.dllsqlite3.exe 文件。 - 在PATH环境变量中添加C:\>sqlite,最后进入命令提示符并发出sqlite3命令,应该可以了。

事实上,当我在提示符中输入sqlite3 时,它确实有效。

但是我知道我仍然缺少一些步骤,但我不知道是什么。

问题

我在编译依赖项时缺少什么?

【问题讨论】:

【参考方案1】:

原来我的问题是因为exqlite 使用了 NIF。这意味着我需要为 Windows 做一个额外的设置步骤,我在其中安装 cpp 工具,然后使用此提示编译 exqlite

cmd /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"

完整的指南可以在这里看到: https://hexdocs.pm/exqlite/windows.html

官方论坛的更多信息:

https://elixirforum.com/t/cannot-compile-exqlite-on-windows/43693/2?u=fl4m3ph03n1x

【讨论】:

无法在 Windows 10 上编译 Cairo C 代码

】无法在Windows10上编译CairoC代码【英文标题】:CannotcompileCairoCcodeonWindows10【发布时间】:2017-10-0100:55:24【问题描述】:我正在尝试使用msys64在Windows10上编译zetcodelines。我使用如下编译命令:gccexample.c-oexample`pkg-config--cflags--libscair... 查看详情

无法在 Windows 7 上编译 restbed

】无法在Windows7上编译restbed【英文标题】:Can\'tcompilerestbedonWindows7【发布时间】:2017-04-2715:08:41【问题描述】:我已经结束了16个小时的配置、安装、删除、修改和多次敲击我的键盘......我想使用restbed进行独立于平台的C++编程,... 查看详情

在 Windows 上编译时出现 Apache thrift 错误

】在Windows上编译时出现Apachethrift错误【英文标题】:Apachethrifterrorwhilecompilingonwindows【发布时间】:2018-09-2508:22:45【问题描述】:我正在尝试在我的Windows10机器上编译Apachethrift版本0.10.0。出于编译目的,我使用的是apachethrift提供... 查看详情

Cygwin 在 windows xp 上编译 HPLIP

】Cygwin在windowsxp上编译HPLIP【英文标题】:CygwincompilingHPLIPonwindowsxp【发布时间】:2013-04-2906:17:52【问题描述】::可以使用cygwin在windowsxp机器上成功构建cups-1.6b1、net-snmp-5.7.2和sane1.0.23。但无法构建hplip-3.13.4在./configure上出现以下... 查看详情

帮助在 Windows 上编译 seek-bzip2

】帮助在Windows上编译seek-bzip2【英文标题】:Helpcompilingseek-bzip2onWindows【发布时间】:2010-12-1514:22:36【问题描述】:我无法让JamesTaylor出色的小“seek-bzip2”在Windows下编译?它可以索引bzip2存档,然后使用该索引提供对存档各个块... 查看详情

C++/LapackE 代码在 Windows 上编译良好,但相同的代码在 Linux 上编译失败

】C++/LapackE代码在Windows上编译良好,但相同的代码在Linux上编译失败【英文标题】:C++/LapackEcodecompilingfineonWindows,buttheidenticalcodefailscompilationonLinux【发布时间】:2016-12-1401:19:19【问题描述】:使用LapackE和MPI库用C++编写的代码在我... 查看详情

如何在 Windows 上编译 nDPI 库?

】如何在Windows上编译nDPI库?【英文标题】:HowcanIcompilenDPIlibraryonWindows?【发布时间】:2015-06-1912:38:35【问题描述】:该库附带有关如何在Linux上编译它的说明:./autogen.sh./配置制作但是我在网上找不到任何资源可以帮助我直接在W... 查看详情

VRPN C++ 代码可在 Linux 上编译,但不能在 Windows 上编译

】VRPNC++代码可在Linux上编译,但不能在Windows上编译【英文标题】:VRPNC++codecompilesonLinuxbutnotWindows【发布时间】:2016-01-2918:06:59【问题描述】:我在Linux上构建了一个VRPN客户端。基于此:http://www.vrgeeks.org/vrpn/tutorial---use-vrpn以下是... 查看详情

如何在 Windows 上编译它

】如何在Windows上编译它【英文标题】:HowtocompilethisonWindows【发布时间】:2010-01-2519:59:59【问题描述】:好的。我正在尝试在Windows上编译以下应用程序(Segmenter,请参见步骤3)。我检查了源代码并更改了引用,这样一切都会好... 查看详情

如何在 Windows 上编译skia

】如何在Windows上编译skia【英文标题】:HowtocompileskiaonWindows【发布时间】:2018-05-0807:54:31【问题描述】:我尝试按照https://skia.org/user/build中的建议在Windows上编译skia1>bin/gngenout/Static--args=\'is_official_build=true\'2>ninja-Cout/Static构建... 查看详情

Ruby sqlite3 gem 无法在 WSL 上编译

...,而在其他非WSLUbuntu原生环境中它不会失败。总结:我在Windows10Pro(19042.1288)上安装了运行Ubuntu20.04.1LTS的WSL2。我有一个安装 查看详情

使用 minGW 在 Windows 上编译 iPerf2.0.5

】使用minGW在Windows上编译iPerf2.0.5【英文标题】:CompilingiPerf2.0.5onWindowswithminGW【发布时间】:2013-10-0316:27:03【问题描述】:我正在尝试使用minGW/MSYS在Windows上编译iPerf。当我运行./configure时,一切看起来都不错:$./configurecheckingforaB... 查看详情

在 Windows 上编译+分发 Linux 代码

】在Windows上编译+分发Linux代码【英文标题】:compiling+distributingLinuxcodeonWindows【发布时间】:2012-07-0315:29:08【问题描述】:我有一个更大的代码在Linux中运行,用c++(c++11)和python编写并使用许多库(VTK、boost、pyqt、OpenGL)并编译为p... 查看详情

如何在 Windows 上编译 libevent2?

】如何在Windows上编译libevent2?【英文标题】:Howtocompilelibevent2onWindows?【发布时间】:2012-01-2600:56:34【问题描述】:我正在尝试将thislibevent2package编译到Windows,但目前我不能,因为配置脚本是一个shell脚本(/bin/sh;不能在Windows中... 查看详情

在 Windows 上编译 Vala 源代码

】在Windows上编译Vala源代码【英文标题】:CompilingaValasourceOnWindows【发布时间】:2012-09-0117:00:33【问题描述】:我使用以下命令编译了一个vala程序:valactest.vala我当然可以在我的计算机上运行该程序,但是当我尝试在另一台计算... 查看详情

在 Windows 7 上编译 libjingle 时出错

】在Windows7上编译libjingle时出错【英文标题】:Errorwhilecompilinglibjingleonwindows7【发布时间】:2012-06-3007:38:17【问题描述】:我遵循了libjingle下载中包含的自述文件。安装所有3rd方包并运行以下命令:hammer.bat--jobs=6--verbose--mode=allall_... 查看详情

在 Windows 上编译静态 Qt 构建时未定义的引用

】在Windows上编译静态Qt构建时未定义的引用【英文标题】:UndefinedreferenceswhencompilingastaticQtbuildonWindows【发布时间】:2010-06-2411:10:35【问题描述】:我想在Windows平台(WindowsXPSP3)上编译Qt工具包的静态版本。我下载了适用于Windows的... 查看详情

为啥heroku无法在项目上编译构建?

】为啥heroku无法在项目上编译构建?【英文标题】:whydoesherokufailtocompilebuildonproject?为什么heroku无法在项目上编译构建?【发布时间】:2020-09-0715:04:58【问题描述】:我正在尝试部署我工作过的react应用程序,当我尝试推送到herok... 查看详情