11-04-2011 11:25 AM
Newbie question #2... I'm in chapter 5 of the tutorial, just added the button to calculate min and max values of the sinewave. I get two link errors when I try to run the program.
2 Project link errors:
Failed to open external module
Failed to open external module
If I comment out the MaxMin1D function and fudge the min and max values the program runs.
Any ideas?
The function I added is as follows which appears to be identical to the sample in the tutorial.
int CVICALLBACK FindMaxMin (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
ssize_t min_index;
double min;
ssize_t max_index;
double max;
// max = 5;
// min = 3;
switch (event)
{
case EVENT_COMMIT:
MaxMin1D(sine, 100, &max, &max_index, &min, &min_index);
SetCtrlVal(panelHandle, PANEL_MAX, max);
SetCtrlVal(panelHandle, PANEL_MIN, min);
break;
case EVENT_RIGHT_CLICK:
break;
}
return 0;
}
11-04-2011 01:27 PM - edited 11-04-2011 01:28 PM
Have you included the Advanced Analysis Library by adding this line "#include <analysis.h>" into your code?
11-04-2011 01:48 PM
I did, that being said, I can't seem to located that header file, where should it be located?
11-04-2011 01:55 PM
I searched for analysis.h, found it and copied it to the same folder as sample1.c and the program now links and runs.
I'm wondering if I'm missing something in the configuration (not smart enough to know where to search)???
Thanks
11-09-2011 07:44 PM
Don't know. It's automatic by default....
05-15-2013 11:14 AM
I had the same problem. A restart of CVI solved it. Nothing else was necessary. I gues the problem was that I had CVI open for days on my PC.