LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using measurement computing UL library (device USB-1208FS) with CVI

Solved!
Go to solution
Hello, I'm trying to implement the USB-1208FS device from company Measurement Computing (www.mccdaq.com) into our test software tool which has been programmed in Ansi C using CVI compiler. To make first steps, I'm trying to build an executable based on the Ansi C example code "DaqInScan01.c". While I have no problem compiling the code, the linker complains with the below shown errors. Although the cbw32.lib is registered with my project, CVI seems not to be able to reference the library functions. What am I doing wrong? Are there any CVI examples available to guide me into first steps in dealing with this device? I'm using WinXP SP3, CVI is version 9.01 Thanx for your support
0 Kudos
Message 1 of 4
(4,439 Views)
Solution
Accepted by topic author IEE_newsoft

Hello IEE_newsoft,

Looking at the screenshot you posted, one recommendation is to make sure the header file and library have the same name, also have you been able to call the dll or lib successfully in another environment ie like visual studio to verify there is nothing wrong with the files. Also look at this Developers Zone,http://zone.ni.com/devzone/cda/tut/p/id/3453 it walks you through how to use a third party dll in CVI, and  http://zone.ni.com/devzone/cda/tut/p/id/8503 shows you how you can use either Dynamic or Static linking to call your dll. 

Hope this helps

 

BeauH
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(4,411 Views)

Hi,

 

I finally found the reason and the solution for my problem. The reason was the fact that CVI is set to Borland compatibility mode while the UL library from MCC was compiled with a Microsoft compiler. After setting CVI to Microsoft compatibility, I was able to build and run my test application.

As I need Borland mode to stay compatible with the parental application where I want to implement the MCC board, I found a very useful hint on the NI forum that describes how to create an import library:

http://digital.ni.com/public.nsf/allkb/EBCE04F31CBB9ACE862569290071CB28 ("Creating Import Libraries for a DLL in LabWindows/CVI")

 

This solved my problem

 

Nevertheless, thank you fro supporting

 

Regards

0 Kudos
Message 3 of 4
(4,387 Views)

If you are using Borland C comptibility you can use the library provided by MCC named cbw32bc.lib instead of cbw32.lib

0 Kudos
Message 4 of 4
(3,782 Views)