有没有简单的方法来构建 64 位 JD2XX DLL?

发布于 2024-09-27 11:41:37 字数 628 浏览 1 评论 0原文

为了从 Java 应用程序访问 FTDI USB 板,我使用 JD2XX 驱动程序包装 (JD2XX.dll)。它在32位系统上工作得很好,但是当它从64位JVM加载时,它说64位JVM不可能加载32位DLL。非常好理解。为了解决这个小问题,我在 64 位系统上安装了 32 位 JVM,它运行良好。非常简单的解决方案,但向客户解释可能会变得非常复杂!

因此,我想创建或以其他方式获取此 JD2XX.dll 文件的 64 位版本。我想知道是否有人成功地做到了这一点,或者我该如何继续。我认为 ftdi-win32 项目中应该有对 32 位 dll 的引用,我可以在 64 位系统上重新编译所有内容之前将其更改为 64 位 dll 引用,但我没有找到。

我将非常感谢任何有关此事的帮助。我觉得我不会很快找到解决这个问题的方法。我描述的文件可以在最新的这些包中找到。

非常感谢你,

MJ

For accessing FTDI USB boards from Java applications, I'm using the JD2XX driver wrapper (JD2XX.dll). It works very fine on 32-bit systems, but when it is loaded from a 64-bit JVM, it says it is impossible for a 64-bit JVM to load a 32-bit DLL. Very understandable. To get past this little problem, I install a 32-bit JVM on the 64-bit systems and it runs fine. Very simple solution, which can become very complicated to explain to a customer, though!

For this reason, I would like to create or otherwise obtain a 64-bit version of this JD2XX.dll file. I would like to know if someone ever did this successfully, or how I could proceed. I thought there should be a reference to the 32-bit dll in the ftdi-win32 project I could change for a 64-bit dll reference before recompiling everything on a 64-bit system, but I didn't find.

I would greatly appreciate any help about this. I don't feel like I'd find a way around this problem on my own anytime soon. The files I describe can be found in the most recent of these packages.

Thank you very much,

MJ

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

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

发布评论

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

评论(2

葬﹪忆之殇 2024-10-04 11:41:37

我终于成功生成了 64 位 DLL 文件。 ... :)

以下是我获取它的方法:

  1. 下载 JD2XX 包(最最近的日期实际上是 20071214)。
  2. 下载mingw-w64(个人构建sezero)并将其解压到C:\(给出C:\mingw64 )。
  3. 对 JD2XX 包进行了一些修改。
    • 调整Makefile.conf
      • 根据我的系统更正了 MINGW 和 JDK 路径。
      • 选择了 ftdi-win32 和 amd64
    • 重命名了已生成的 32 位 JD2XX.dll 文件,以便 make 停止告知无需执行任何操作。
    • 重命名为 32 位的 ftdi-win32/libftd2xx.a...将其替换为 ftdi-win32/amd64/ftd2xx64.lib 的副本(当然更名为 libftd2xx.a)。
  4. 从 JD2XX 包的主目录中调用 C:\mingw64\bin\mingw32-make.exe。这创建了一个新的 JD2XX.DLL 文件,它允许我与 64 位计算机上的 FTDI 设备进行通信,而无需使用 32 位 JVM。

如果有人需要的话,生成的文件可供下载

I finally managed to generate that 64-bit DLL file. ... :)

Here is how I obtained it:

  1. Downloaded the JD2XX package (the most recent is actually dated 20071214).
  2. Downloaded mingw-w64 (personal build sezero) and decompressed it in C:\ (giving C:\mingw64).
  3. Brought some modifications to the JD2XX package.
    • Adjusted Makefile.conf
      • Corrected MINGW and JDK paths according to my system.
      • Selected ftdi-win32 and amd64
    • Renamed the already generated 32-bit JD2XX.dll file so that make stops telling there is nothing to be done.
    • Renamed ftdi-win32/libftd2xx.a which is 32-bit... Replaced it by a copy of ftdi-win32/amd64/ftd2xx64.lib (renamed as libftd2xx.a, of course).
  4. Called C:\mingw64\bin\mingw32-make.exe from the main directory of the JD2XX package. This created a new JD2XX.DLL file which allows me to communicate with FTDI devices on my 64-bit computer without having to use a 32-bit JVM.

The generated file for download if anyone needs it.

药祭#氼 2024-10-04 11:41:37

“生成的下载文件”对我不起作用,所以我按照说明自己制作了它,它有效:
http://dev.geogebra.org/download/lib/ftdi/JD2XX_64_2 .08.17.dll

看起来你应该能够通过下载正确版本的 mingw-w64 在 32 位系统(甚至 Linux)上构建 64 位 dll:
https://sourceforge.net/ items/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/sezero_4.5_20111101/

此外,某些链接已过期。这些是当前的:

d2xx.svn.sourceforge.net/viewvc/d2xx/trunk/

www.ftdichip.com/Drivers/D2XX.htm

The "generated file for download" didn't work for me, so I followed the instructions and made it myself, which works:
http://dev.geogebra.org/download/lib/ftdi/JD2XX_64_2.08.17.dll

It also looks like you should be able to build a 64-bit dll on a 32-bit system (or even on linux) by downloading the correct version of mingw-w64:
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/sezero_4.5_20111101/

Also, some of the links are out of date. These are current:

d2xx.svn.sourceforge.net/viewvc/d2xx/trunk/

www.ftdichip.com/Drivers/D2XX.htm

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