LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dll

I use "Call Library Function Node"in LabVIEW6.1,and this is the .c file in VC++

/* Call Library Source File */

#include extcode.h

_declspec(dllexport) long avg_num(float a[], long size, float *avg);

_declspec(dllexport) long avg_num(float a[], long size, float *avg)
{

/* Insert Code Here */
int i;
float sum=0;
if(a != NULL)
{
for(i=0;i < size; i++)
sum = sum + a[i];
}
else
return (1);
*avg = sum / size;
return (0);

}



But I get the following error:

f:\mydocument\labview\myshared.c(3) : fatal error C1083: Cannot open include file: 'extcode.h': No such file or directory
0 Kudos
Message 1 of 2
(2,981 Views)
nuaa;

The error is saying that it could not find the 'extcode.h' header file.

Make sure you tell VC++ where the .h file is. In VC++, go to "Project -> Settings...", change the "Settings For:" to "All Configurations"; select the "C/C++" tab; in the "Category" field select "Preprocessor" and in the "Additional Include Directories" type the path to the extcode.h file. This is usually \cintools.

Regards;
Enrique
www.vartortech.com
Message 2 of 2
(2,981 Views)