Hi All,
Traditionally a LabVIEW man although i have had the need to do some work in C, which i am completely un accustomed with. I need to pass fixed precision numbers to a c module, do some fixed precision maths on it and pass it back to LabVIEW. So, in my eagerness, I have available to me CVI. I try to do the .dll example from LabVIEW and get to the point where i want to compile the code. I get a whole bunch of compile errors the first two being. Any pointers on where to go from here would be great. I dont understand the top part of the C file in great detail , however this part was automagically written for me from LabVIEW and i could do the lower lever c bit myself (which is a fairly easy task).
Thanks in advance, i know this is a very fluffy post, however i feel i am out of my depth here..
"Declared Parameter avg_num is missing." - (highlights the first instance of avg_num)
"missing prototype" - (highlights the second occurance of _declspec)
/* 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)
{
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);
}
LabVIEW 2012