MATLAB: FTDI lib in C MEX function

ftdi lib dll c-mex

Hello,
I'd like to use the FTDI driver library http://www.ftdichip.com/Drivers/D2XX.htm to communicate with my development board. I've written a test C++ code in VS2010 to test the functioning of the library, It works well, but if I try to use this lib within a C-MEX S-Function I got the following error: I'm using the same compiler in both case.
>> mex mult.cpp D:\MATLAB\Projects\MATLABQUESTION\ftd2xx.lib
Creating library C:\Users\Daniel\AppData\Local\Temp\mex_TYSDRk\templib.x and object C:\Users\Daniel\AppData\Local\Temp\mex_TYSDRk\templib.exp
mult.obj : error LNK2019: unresolved external symbol __imp_FT_ListDevices referenced in function "void __cdecl mdlInitializeSizes(struct SimStruct_tag *)" (?mdlInitializeSizes@@YAXPEAUSimStruct_tag@@@Z)
mult.mexw64 : fatal error LNK1120: 1 unresolved externals
Thank you,
Daniel

Best Answer

I found the problem, the library is an 32 bit lib.
Related Question