cl.exe 构建 Sqlite 模块时出现错误 D8003(缺少源文件名)
cl.exe error D8003 (missing source filename) when building a Sqlite module
虽然我在 Linux 上下载并解压了 https://sqlite.org/2016/sqlite-src-3110100.zip. Then when trying to build as a DLL the extension spellfix
(it ):
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
cd sqlite-src-3110100
cl /I"src\" ext\misc\spellfix.c /link
我得到:
cl : Command line error D8003 : missing source filename
为什么?
你应该试试:
cl /I <path to sqlite amalgation> <path-to-spellfix.c> /link /DLL /OUT:spellfix.dll
我在 DBeaver 和 SQLite 的 jdbc 驱动程序中遇到了类似的问题。并希望它能帮助某人节省一些时间。
问题:
我无法加载扩展 spellfix
我在执行时收到错误“没有这样的模块 spellfix1”
select * 来自 table1,其中 col1 喜欢 'asd%'
SQLite 的文档并不明显如何加载扩展,也不构建它(这个线程帮助了我,谢谢你们,但仍然不明显,因为我没有为很长一段时间)
解决方案:
- 我已经从下面的 url 下载了 sqlite 的源代码,然后按照上面的 post 的步骤完成,但是因为我有 x64 DBeaver,所以我收到错误消息
SQL 错误或缺少数据库(%1 不是有效的 Win32 应用程序。)
很明显,我需要 x64 构建,所以我执行了以下步骤:
a) 在命令提示符下执行:
call "E:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
amd64 参数是为 x64 build
设置构建环境所必需的
b) 之后我使用了 cl 命令:
cl /I "<path to sqlite amalgation folder>" "ext\misc\spellfix.c" /link /DLL /OUT:spellfix64.dll
cmd 提示符位于我从此 URL 下载最新 sqlite 源代码的位置。
我是怎么做到的 link 也有点冒险 :)
之后将我的dll放到指定位置并在DBeaver
中执行load_extension命令
select load_extension('E:/Users/Name/Downloads/SQLite/ext/spellfix64');
我放置构建版本的路径。为了能够构建 x64 版本,我需要使用上述注释进行构建。
呃,还有一件事,您需要在 DBeaver 的连接属性上 启用加载扩展:post 是 here。
虽然我在 Linux 上下载并解压了 https://sqlite.org/2016/sqlite-src-3110100.zip. Then when trying to build as a DLL the extension spellfix
(it
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
cd sqlite-src-3110100
cl /I"src\" ext\misc\spellfix.c /link
我得到:
cl : Command line error D8003 : missing source filename
为什么?
你应该试试:
cl /I <path to sqlite amalgation> <path-to-spellfix.c> /link /DLL /OUT:spellfix.dll
我在 DBeaver 和 SQLite 的 jdbc 驱动程序中遇到了类似的问题。并希望它能帮助某人节省一些时间。
问题:
我无法加载扩展 spellfix 我在执行时收到错误“没有这样的模块 spellfix1”
select * 来自 table1,其中 col1 喜欢 'asd%'
SQLite 的文档并不明显如何加载扩展,也不构建它(这个线程帮助了我,谢谢你们,但仍然不明显,因为我没有为很长一段时间)
解决方案:
- 我已经从下面的 url 下载了 sqlite 的源代码,然后按照上面的 post 的步骤完成,但是因为我有 x64 DBeaver,所以我收到错误消息
SQL 错误或缺少数据库(%1 不是有效的 Win32 应用程序。) 很明显,我需要 x64 构建,所以我执行了以下步骤:
a) 在命令提示符下执行:
call "E:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
amd64 参数是为 x64 build
设置构建环境所必需的b) 之后我使用了 cl 命令:
cl /I "<path to sqlite amalgation folder>" "ext\misc\spellfix.c" /link /DLL /OUT:spellfix64.dll
cmd 提示符位于我从此 URL 下载最新 sqlite 源代码的位置。 我是怎么做到的 link 也有点冒险 :)
之后将我的dll放到指定位置并在DBeaver
中执行load_extension命令select load_extension('E:/Users/Name/Downloads/SQLite/ext/spellfix64');
我放置构建版本的路径。为了能够构建 x64 版本,我需要使用上述注释进行构建。
呃,还有一件事,您需要在 DBeaver 的连接属性上 启用加载扩展:post 是 here。