Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

calling LabVIEW - DLL in VC++

hello

i had made a dll in labview.

i am trying to call it in VC++. i have installed Measurement studio for the vc++ version (6.0).

the functions in the dll are recognised. the object code is built.

but, it gives an error that 'waveform.obj cannot be opened'.

i do not know where this object file is coming from.my program is saved as 'checkdll,cpp'.

my dll generates a waveform using 'generate waveform' functions on labview. it generates sine/square/tri/sawtooth waveforms.
the dll was working fine when called in labview.

when i am calling it in vc++, i am facing this error.

please!! some one show me the missing link!!
 

0 Kudos
Message 1 of 6
(7,843 Views)
Did you add C:\Program Files\National Instruments\<LabVIEW x.x>\cintools to the include directories in Visual Studio.  If not, go to Tools>>Options, click the Directories Tab, and make sure you are showing "Include files".  Then add that directory to that list. 

Step 8 of this document has a picture of the dialog:
Calling a DLL from Microsoft Visual C++ that Was Generated by LabVIEW 6i
http://zone.ni.com/devzone/cda/tut/p/id/3927

Let me know if you'd already done that, or if you do that and the problem still persists.


Kristen
National Instruments
0 Kudos
Message 2 of 6
(7,833 Views)
Hi

thankyou!

that helped.

but, i have a doubt

i give these dlls to a user who does not have LV. then, what steps should i take to ensure that i do not get this error?

thanks
0 Kudos
Message 3 of 6
(7,823 Views)
Hi MScap,
 
From what I understand, you can investigate three possible fixes.
  1. First, you can create an installer from VC++, and then the necessary files will be included when you distribute your program.
  2. Second, since in LabVIEW there is a datatype of "waveform", this could be what is unable to be defined in VC++.  In order to transform the waveform datatype in LabVIEW so that it can be easily recognized in VC++ without needing to specify what the waveform datatype is, you can "unbundle" the waveform datatype into its three comonents (array of values, starting point, change in time values) and then recombine those three pieces of information inside of VC++.
  3. Third, you could possibly install the free, LabVIEW run-time engine on another computer and direct the VC++ program to the files needed in order for VC++ to translate the LabVIEW DLL.
Please let me know what the easiest fix is for yourself.
 
I hope this helps,
Kevin S.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(7,777 Views)
hi

sorry for the delayed reply. i have actually solved the problem using the suggestion by Kristen.

also, i have the option of installing LV runtime engine, as suggested by you in point 3.


thank you for the help!

0 Kudos
Message 5 of 6
(7,655 Views)

Hi,

 

i've another problem with integration of labview dll in vc++98.

 

 

I've a lv dll in lv7.1 where some function uses cintools to comunicate with vector hw.

When i call from VC++ a function, that use cintools, receive this error:

"Fatal Error LABVIEW.LIB was not called from a LabVIEW process" and a lvsD.tmp attacched was created.

 

how can i solve this problem?

 

i've tried to use lv 2009, but i'm not able to create vc++ executable, because receive a linker error: "LINK : fatal error LNK1000: unknown error; consult documentation for technical support options"

 

Thanks

 

0 Kudos
Message 6 of 6
(6,245 Views)