FTDI Community

General Category => Discussion - Software => Topic started by: allenhuffman on July 03, 2023, 02:57:05 PM

Title: Why are there two LibFT4222-64.lib files in LibFT4222-v1.4.5.zip?
Post by: allenhuffman on July 03, 2023, 02:57:05 PM
I have only been building for 64-bit, but recently was told to create a 32-bit as well. During the process of updating from 1.4.4 to the 1.4.5 zip, I noticed there are duplicate lib files with the same name, but different file sizes:

LibFT4222-v1.4.5.zip\LibFT4222-v1.4.5\imports\LibFT4222\dll\amd64 -- 3 KB

LibFT4222-v1.4.5.zip\LibFT4222-v1.4.5\imports\LibFT4222\lib\amd64 -- 743 KB

In our existing project, the files needed were collected together, but I am not sure which one I should use now.

Title: Re: Why are there two LibFT4222-64.lib files in LibFT4222-v1.4.5.zip?
Post by: FTDI Community on July 04, 2023, 04:35:02 PM
Hello,

It depends if you are building a static or dynamic application.

.lib is a static library which is linked into an .exe at compile time. Only the .lib is included in the folder.
.dll is a dynamic library that is loaded at runtime. That includes a .lib for the symbols.

Best Regards,
FTDI Community
Title: Re: Why are there two LibFT4222-64.lib files in LibFT4222-v1.4.5.zip?
Post by: allenhuffman on July 05, 2023, 02:46:55 PM
Hello,

It depends if you are building a static or dynamic application.

.lib is a static library which is linked into an .exe at compile time. Only the .lib is included in the folder.
.dll is a dynamic library that is loaded at runtime. That includes a .lib for the symbols.

Fantastic -- I did not know a static library was provided. Thanks!

I see only one ftd2xx.lib - what DLL does it use?

Quote
•   D2XX Interface
ftd2xx.h
  Dynamic library
    ftd2xx.lib (32-bit)
    ftd2xx.lib (64-bit)
Title: Re: Why are there two LibFT4222-64.lib files in LibFT4222-v1.4.5.zip?
Post by: FTDI Community on July 06, 2023, 04:42:14 PM
Hello,

There are two ftd2xx.lib files for x86 and x64.

The static .lib doesn't rely on a .dll.

Again you can reference the most recent .lib and .dll for D2xx in the 2.12.36.4 (https://www.ftdichip.com/Drivers/CDM/CDM%20v2.12.36.4%20WHQL%20Certified.zip) driver files.

TN_153 Instructions on Including the D2XX Driver in a Visual Studio Express 2013 Project (https://ftdichip.com/wp-content/uploads/2020/08/TN_153-Instructions-on-Including-the-D2XX-Driver-in-a-VS-Express-2013-Project.pdf) should help you too.

Best Regards,
FTDI Community