LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Redefinition of macro 'TRIG'.

Solved!
Go to solution

     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.  

0 Kudos
Message 1 of 11
(5,141 Views)

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?

0 Kudos
Message 2 of 11
(5,140 Views)

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.

 

EditorPrefs.png



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 11
(5,135 Views)

They were all selected.

0 Kudos
Message 4 of 11
(5,132 Views)

I modified it when exposing errors. Can I use UI editor generate a new include file? How to buid a new include file?

0 Kudos
Message 5 of 11
(5,130 Views)
Solution
Accepted by topic author anyang

Every include file says Smiley Wink:

 

/* 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.

Message 6 of 11
(5,124 Views)

The same errors still exists.Does it have another solution?

0 Kudos
Message 7 of 11
(5,114 Views)

I solve the problem,thank you very much.Smiley Happy

0 Kudos
Message 8 of 11
(5,112 Views)

You're welcome!

0 Kudos
Message 9 of 11
(5,107 Views)

anyang:

 

What did you do to solve your problem? I have the same problem, a Redfinition error with a panel.

 

Thanks,

John

0 Kudos
Message 10 of 11
(4,997 Views)