gpt4 book ai didi

c# - 让 Mono 和 Firebird Embedded 在 Linux 上运行

转载 作者:太空狗 更新时间:2023-10-29 12:04:00 24 4
gpt4 key购买 nike

我最近在研究 Firebird Embedded,认为它可以在我的项目中替代 SQLite。问题是,我希望能够在 Windows 和 Linux 上使用我的应用程序的相同编译,不幸的是,对于 SQLite,这是不可能的。

仍然,我无法让 Firebird 在带有 Mono 的 Linux 上运行(还没有尝试过 Windows)。

我做过的事情:

  1. 从 NuGet 安装了 Firebird ADO.NET Provider
  2. 已下载 32 bit embedded client for Windows libraries并解压到我的bin目录:fbembed.dll, firebird.cfg, firebird.msg, ib_util.dll , icudt30.dll, icuin30.dll, icuuc30.dll.
  3. 创建连接字符串:

    string fbConnectionString = String.Format ("ServerType=1;User=SYSDBA;" + Password=masterkey;Dialect=3;Database={0};Charset=UTF8", _dbFile);
    FbConnection.CreateDatabase (fbConnectionString);
  4. 仍然出现错误,在路径中找不到 fbembed.dll

我该怎么办?

最佳答案

Firebird .NET 提供程序主要是为 Windows 平台开发的。 wire 协议(protocol)实现适用于 Mono 和 Linux,因此它可以连接到普通的 Firebird 服务器。

用于 Firebird Embedded 的 fbembed.dll 库特定于 Windows,无法在 linux 上加载。 .NET provider code确实支持 Linux,但看起来你需要专门为 Linux 编译它。我假设 NuGet 包是编译时支持 Windows 和嵌入式的默认版本。

关于c# - 让 Mono 和 Firebird Embedded 在 Linux 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21597708/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com