LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI Compiler errors using a DLL from FTDI to control a USB->I2C device

I am using attached .H and .lib files to control a USB->I2C Instrument. The
problem I have is that the CVI compiler is giving me errors when I try to
use any of the functions on the .H File, (for example the function FT_Open
-which should be the first function to call-).

I also have a C++ compiler and does not give me any errors so I believe
there is a compatability problem or I am missing a .h file that CVI needs
to recognize what's on this DLL functions.

Any ideas???
(408) 361-3216
rafael_garciabasulto@jabil.com
0 Kudos
Message 1 of 4
(4,342 Views)
I wrote this little test and it compiles and runs fine for me. I had to include windows.h because ftd2xx.h depends on it. I also had to change to Borland compatibility mode (the associated library is in OMF format).

#include
#include "ftd2xx.h"

int main(void)
{
FT_HANDLE handle;
FT_Open (0, &handle);
FT_ClrRts (handle);
return 0;
}

Could you elaborate on what problems you were having?

Regards,

Alex
0 Kudos
Message 2 of 4
(4,337 Views)
Alex:
It looks like your message was the victim of the HTML error detection in the new forum: when you use angle brackets (less-than, greater-than) in an #include statement, the forum tries to interpret it as HTML, detects an error, and deletes the .h file enclosed in the brackets.
#include [LESS_THAN]windows.h[GREATER-THAN]
gets truncated to
#include
as displayed in the new forum.
I've had some correspondance with Molly about this.
0 Kudos
Message 3 of 4
(4,305 Views)
Thanks Al,

Maybe a trick is to insert a space of double < < > >.

Example:

#include < windows.h > // space
#include <> // double

(trying to see what will work)

-JLV-
Message 4 of 4
(4,279 Views)