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

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

问题描述

我有一个时间让我的测试,对我的SQLite的数据提供程序运行赫克。



我看过建议的链接的here计算器上,但他们都不让我下去了正确的道路。



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



我已经复制了sqlite3.dll到我的两个 Sqlite\bin 目录,以及我的 Tests\bin 目录
DLL复制到的bin目录



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





是否有一个明确的方式来获得这方面的工作都在我的Windows开发环境(主要现在的目标),以及运行在Android和IOS(在不久的将来需要)?



此外,如果它很重要,这里有我的sqlite的项目引用。




解决方案

所以对我来说,答案是很简单。我有线了,检查机器的体系结构,并复制相应的DLL到输出bin目录中一个预生成的事件。



现在我们的团队可以简单地运行任何人 REBUILD ,以及正确的DLL将可以对SQLite的运行。



<预类=郎文prettyprint,覆盖> 如果'$(PROCESSOR_ARCHITECTURE)'=='AMD64'(XCOPY / Y$(PROJECTDIR)x64\sqlite3.dll.\)
如果'$( PROCESSOR_ARCHITECTURE)'=='86'(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天全站免登陆