来自 C++ 的 EXE,Sqlite dll(如果有)

发布于 2024-12-11 14:39:34 字数 353 浏览 0 评论 0原文

我是一名 Java 程序员,曾经遇到过一个非常糟糕的情况。出于 POC 目的,我需要写下解决方案的一小部分,它将作为独立应用程序运行,执行一些非常具体的操作。 我有 2 个问题:-

  1. 我可以编写代码,但我不知道如何从 C++ 代码创建安装程序和 exe。
  2. 其次,我需要解析 sqlite 数据库文件并在应用程序中显示其数据。是否有 sqlite windows dll 或某些 C++ 库或其他我可以使用的东西,而不是要求用户安装 sqlite (或通过安装程序自己安装)?所以基本上,我不想推入额外的程序,只是一个 dll 或一些 C++ 库。

如果您对我面临的一个或两个问题有答案,请告诉我。

谢谢

I am a Java programmer and have come across a very nasty situation. For POC purposes, I need to write down a small segment of my solution that will run as a standalone application doing something very specific.
I have 2 questions:-

  1. I can write the code, but what I don't know is how do I create an installer and exe out of that C++ code.
  2. Secondly, I need to parse a sqlite db file and show its data in the application. Is there a sqlite windows dll or some C++ library or something that I can use, instead of asking the user to install sqlite (or doing it myself through the installer)? So basically, I don't want an extra program to be pushed in, just a dll or some C++ library..

Please let me know if you have an answer to either or both the issues that I'm facing.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

海之角 2024-12-18 14:39:34
  1. 编译您的代码会将其转换为可执行文件。对于分发,您需要在发布模式下构建它。我不确定您使用的是哪个版本的 Visual Studio,但您可能有一个“安装和部署”项目类型,这将使​​您能够创建安装程序。如果做不到这一点,您可能需要查看 InstallShield 或类似的工具,以确保安装程序具有所有必需的文件(例如运行时库)。

  2. SQLLite 被称为轻量级是有原因的!它的源代码可以直接合并到您的项目中,并与其余文件一起编译(请参阅:http ://www.sqlite.org/selfcontained.html )。这意味着不需要链接外部库,也不需要与可执行文件一起重新分发额外的 DLL。

  1. Compiling your code will turn it in to an executable. For distribution, you'll want to build it in Release mode. I'm not sure what version of Visual Studio you are using, but you might have a "Setup and Deployment" Project type which will enable you to create an installer. Failing that, you may have to look at InstallShield or a tool like that to ensure that the installer has all necessary files (such as the runtime libraries).

  2. SQLLite is called light for a reason! The source code for it can be incorporated directly in to your project and compiled alongside the rest of the files (see: http://www.sqlite.org/selfcontained.html ). This means no external libraries are necessary to link against, and no extra DLLs need to be redistributed alongside your executable.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文