可以将SQLite库嵌入(Link)到Delphi可执行文件吗? [英] Can SQLite library embed (Link) to Delphi executable file?

查看:216
本文介绍了可以将SQLite库嵌入(Link)到Delphi可执行文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如果我们能够将SQlite库嵌入到Delphi可执行文件中,我们可能将我们的应用程序部署为没有任何SQlite dll文件的单个.exe文件。



嵌入不是将sqlite dll文件保存到资源中,而是链接到Delphi可执行文件。

解决方案

我有同样的问题,我想出了这个解决方案。也许它可以帮助你。只需包括sqlite3,然后可以直接访问dll函数。我使用了与之相同的方法:
http://simvector.com/download/ delphi_sqlite3.zip



DLL只是以源代码形式编码,DLLLoader单元在运行时加载它。最终的结果是在您的发行版中没有额外的DLL,代价是一切都通过操作系统加载到需要的部分。



我们需要它正常工作,但在发行版中没有额外的数据。这样可以满足我们的需要。


I am wondering if we able to embed SQlite library into Delphi executable file and we may deploy our application as single .exe file without any SQlite dll file.

The embed is not keep the sqlite dll file into resource but link to Delphi executable file.

解决方案

I had the same problem and this is the solution I came up with. Maybe it can help you. Just include sqlite3 and you then have direct access to the dll functions. I used the same methods that have already be outlined: http://simvector.com/download/delphi_sqlite3.zip

The DLL is just encoded in source form and the DLLLoader unit loads it at runtime. The end result is no extra DLL in your distro at the expense of it all being loaded into memory at once vs parts loaded on demand via the OS.

We needed it to work as normal, yet no extra dll in distro. So works for our needs.

这篇关于可以将SQLite库嵌入(Link)到Delphi可执行文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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