LabWindows/CVI is an ANSI C development environment and recognises only the ANSI C data types. The ftd2xx.h file uses standard Microsoft data types which are not recognised by the ANSI C compiler.
Projects can be compiled by performing the following steps:
• | If windows.h is included in the project, LabWindows/CVI can use the non-standard ANSI C data types in ftd2xx.h. If they are not already present in the project, add these lines to the code: |
#include <windows.h>
#include "ftd2xx.h"
• | Add the ftd2xx.lib file to the project. This can be done by selecting "Edit > Add Files to Project...", clicking "Library(*.lib)..." and the selecting ftd2xx.lib. Click "Add" then "OK" to add ftd2xxx.lib to the project. |
• | Select "Options > Build Options...". Ensure that the "Compatibility with:" box is set to "Visual C/C++" and that the "Default calling convention:" box is set to "__stdcall". Changing these options may require that LabWindows/CVI is closed and then restarted. |
Projects using FTDI D2XX drivers should then compile.