无法加载DLL'sqlite3':找不到指定的模块 [英] Unable to load DLL 'sqlite3': The specified module could not be found

查看:700
本文介绍了无法加载DLL'sqlite3':找不到指定的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经查看了建议的链接在stackoverflow 上,但他们似乎都没有让我顺利路径。



我已下载Windows 预编译sqlite3.dll的二进制文件



我将sqlite3.dll复制到我的 Sqlite\bin 目录以及我的 Tests\bin 目录



不幸的是,当我运行我的测试,我得到以下错误





在Windows开发环境中实现此工作的方法(主要目标)现在)以及在Android和IOS(在不久的将来需要)中运行?



另外,如果重要,这里是我的Sqlite项目引用。 >

解决方案

所以我的答案很简单。我连接了一个Pre-Build事件,检查机器的架构,并将相应的dll复制到输出bin目录中。



现在我们团队中的任何人都可以直接运行 REBUILD ,并且正确的dll将可用于对SQLite运行。

 if'$( $ x''(xCopy / y$(ProjectDir)x86 \sqlite3.dll.\)
如果'$(PROCESSOR_ARCHITEW6432)'=='AMD64'(xcopy / y $(ProjectDir)x64\sqlite3.dll.\)


I'm having a heck of a time getting my tests to run against my SQLite Data Provider.

I've looked at the suggested links here on stackoverflow, but none of them seem to get me going down the right path.

I've downloaded the Windows Precompiled Binaries for sqlite3.dll

I've copied the sqlite3.dll into both my Sqlite\bin directory as well as my Tests\bin directory

Unfortunately when I run my tests, I get the following error

Is there a clear cut way to get this working both in my Windows dev environment (primary goal right now) as well as running in Android and IOS (required in the near future)?

Also, if it matters, here are my Sqlite project references.

解决方案

So the answer for me was quite simple. I wired up a Pre-Build event that checks the architecture of the machine, and copies the appropriate dll into the output bin directory.

Now anyone on our team can simply run REBUILD, and the proper dll will be available to run against SQLite.

if '$(PROCESSOR_ARCHITECTURE)'=='AMD64' (xcopy /y "$(ProjectDir)x64\sqlite3.dll" ".\") 
if '$(PROCESSOR_ARCHITECTURE)'=='x86' (xcopy /y "$(ProjectDir)x86\sqlite3.dll" ".\")
if '$(PROCESSOR_ARCHITEW6432)'=='AMD64' (xcopy /y "$(ProjectDir)x64\sqlite3.dll" ".\")

这篇关于无法加载DLL'sqlite3':找不到指定的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆