03-13-2013 08:07 AM
Recently, a hard problem was frustrating me. I created some panels and compiled them, then I creat some new panels, there will be some errors like " Redefinition of macro 'TRIG'." ___TRIG is one of panels;
For example :
now i have some panels,and the compiled header file is :
#define PANEL 2
#define RUN 3
#define RUN_RUN 2 /* control type: command, callback function: (none) */
#define SETUP 4
#define SETUP_SYSTEM 2 /* control type: tab, callback function: (none) */
#define TIMEPANEL 5
#define TIMEPANEL_STARTTIME 2 /* control type: canvas, callback function: (none) */
#define TRIG 6
#define TRIG_MODEWORK 2 /* control type: binary, callback function: (none) */
when I creat a new panel "DROP" :
#define DROP 2
#define DROP_RESIDUAL 2 /* control type: graph, callback function: (none) */
#define PANEL 3
#define RUN 4
#define RUN_RUN 2 /* control type: command, callback function: (none) */
#define SETUP 5
#define SETUP_SYSTEM 2 /* control type: tab, callback function: (none) */
#define TIMEPANEL 6
#define TIMEPANEL_STARTTIME 2 /* control type: canvas, callback function: (none) */
#define TRIG 7
#define TRIG_MODEWORK 2 /* control type: binary, callback function: (none) */
the error is Redefinition of macro 'TRIG' 'PANEL' 'SETUP' 'RUN'?
what's wrong with them? How to creat a new panel? Does it has the same question if I creat some new "Numeric"?
Anticipating for your question.
Solved! Go to Solution.
03-13-2013 08:17 AM
Did you modify the include files yourself? If all your include files have been generated by the UI editor everything should be fine.
How did you load your panels?
03-13-2013 08:27 AM
You can also check that the UIR editor automatically generates object names: use Options >> Preferences... when the UIR editor is shown and then click on More... button: check that highlighted checkboxes are marked. This way the editor should take care of name duplicates and warn you if there are any, automatically generating the include file associated with your .UIR file when all is correct.
03-13-2013 08:30 AM
They were all selected.
03-13-2013 08:33 AM
I modified it when exposing errors. Can I use UI editor generate a new include file? How to buid a new include file?
03-13-2013 08:38 AM
Every include file says :
/* WARNING: Do not add to, delete from, or otherwise modify the contents of this include file. */
You can regenerate it by opening your GUI in the UI editor, change a setting (back and forth, e.g. move a control up and down again), this will mark the UI as modified so that you can save it.
03-13-2013 09:21 AM
The same errors still exists.Does it have another solution?
03-13-2013 09:27 AM
I solve the problem,thank you very much.
03-13-2013 09:41 AM
You're welcome!
06-07-2013 12:35 PM
anyang:
What did you do to solve your problem? I have the same problem, a Redfinition error with a panel.
Thanks,
John