Thanks for the reply. If LabWindow does not have some special requirement on user defined function, it is strange from what I have seen...
I have something similar to (not exact) the following scenario, DesiredPosition(...) is a callback function of a command button. When I build the code, the error message is missing prototype. I also tried to put
int goDesiredPosition();
in a .h file and #include .h in the .c file.
--------------------------------
int goDesiredPosition();
int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
if ((panelHandle = LoadPanel (0, "myLabWindow.uir", PANEL)) < 0)
return -1;
DisplayPanel (panelHandle);
SetPanelAttribute(panelHandle, ATTR_TITLE, "Dragon Fly Project");
CmtScheduleThreadPoolFunction(DEFAULT_THREAD_POOL_HANDLE, displayParametersInPanel, NULL, &functionID);
RunUserInterface ();
DiscardPanel (panelHandle);
CmtWaitForThreadPoolFunctionCompletion(DEFAULT_THREAD_POOL_HANDLE, functionID, 0);
return 0;
}
int CVICALLBACK DesiredPosition (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
goDesiredPosition();
break;
case EVENT_RIGHT_CLICK:
break;
}
return 0;
}
int goDesiredPosition()
{
int myPosition=5;
}
--------------------------------