01-09-2006 12:08 AM
01-09-2006 01:58 AM
01-09-2006 02:22 AM
Hi,
Thanks for your suggestion.
But after I change as follow
int CVICALLBACK TimeCallback (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
char *timeAndDate;
timeAndDate = malloc(80*sizeof(char));
switch (event)
{
case EVENT_TIMER_TICK:
sprintf (timeAndDate, "%s %s", TimeStr (), DateStr ());
SetCtrlVal(g_vPanelHandle, MAIN_TIMESTRING, timeAndDate);
break;
}
return 0;
}
and of course I have include windows.h at the top of main.c
#include <windows.h>
#include <analysis.h>
#include "age1960.h"
#include "EMMI.h"
#include <utility.h>
#include <ansi_c.h>
#include <string.h>
#include <formatio.h>
#include <visa.h>
#include <userint.h>
#include <cvirte.h> /* Needed if linking in external compiler; harmless otherwise */
the error is the same as before:-(
Hope you can understand what I mean
01-09-2006 02:31 AM
I would also investigate wether you have defined elsewhere in your program some element named "MSG": this is the name of a structure defined in winuser.h (line 1466: the first error in your list) and comes in conflict with controls or variables with the same name exsisting in the application.
I personally tend not to use all-uppercase control names since the risk of conflicting names between my controls (defined as macros in the include file associated with the UIR) and system elements is very high. Nevertheless, sometimes it happens that I choose a name already present in some system include file and the "Empty declaration" error you find is the main warning lamp of this fact.
Let me know if this helps you a little
Roberto
01-09-2006 02:46 AM
Hi,
yes, as you mentioned, I define a popup ,pls look at code as follow,which i define in the *.h file
#define MSG 10
#define MSG_OK 2 /* callback function: Button_Message_Dialog_Ok */
#define MSG_PICTUREBUTTON 3
#define MSG_MSG 4
could you tell me how to avoid this conflict. thanks
crystal
01-09-2006 02:55 AM - edited 01-09-2006 02:55 AM
Message Edited by Roberto Bozzolo on 01-09-2006 09:56 AM
01-09-2006 03:37 AM
Hi,
Great! It works after I do what you have told me. Thanks a lot! Since I used to compile with Labview. But now i need to compile with CVI, so I am a freshman of CVI.
Another question with my CVI,
After I debug my CVI, it display run-time errors as follow:
NON-FATAL RUN-TIME ERROR: "gsm_rf_tester_main.c", line 201, col 8, thread id 0x000006E4: Library function error (return value == -79 [0xffffffb1]). The control values could not be completely loaded into the panel because the panel has changed.
but I can got the CVI debug.exe file.
Hope you can help me.
crystal
01-09-2006 03:59 AM
I'm happy you solved your problem.
Regarding the -79 error, have you checked the Save/RecallPanelState that Colin suggested in the other thread?
01-09-2006 04:19 AM
hi
I remark the Recall Panel State code in my app as colin told me, the error doesn't happen.
thanks
01-10-2006 03:43 PM