May i use the same variable placed in a library and in the main program at the same time???

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

May i use the same variable placed in a library and in the main program at the same time???

1,458 Views
mauricio2346
Contributor II
Hi.

i want to control two diferent actions with IRQ interrupt, creating a variable (Estado) in two functions placed in a library i made.  when one of them is used in the main program, Estado's values is 1 ( in the library),  with othe function  its value is -1 (estado).  when i try to use Estado in the main program it recognizes the word Estado (changing text's color to bright blue), but when i check the program (F7), it say that Estado is not declared.  How can i do that????  it can be made by another way??? thanks!
Labels (1)
0 Kudos
1 Reply

191 Views
CrasyCat
Specialist III
Hello
 
You need to do a proper definition for the variable somewhere in the application.
 
Are you linking the library with your application?
Is estado defined in somewhere in the library (something like (int estado:smileywink: or do you have only external declaration for it (extern int estado:smileywink:?
 
CrasyCat
0 Kudos