Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to make global variable in libray project using MPLAB X IDE
- void abcTest(int n){
- // I want store n as global variable
- }
- #ifndef _ABC_H
- #define _ABC_H
- void abcTest(int n);
- #endif;
- #include "abc.h"
- void main(void) {
- abcTest(10);
- }
- extern int global_a;
- void abcTest(int n){
- global_a+=n;
- }
- #ifndef _ABC_H
- #define _ABC_H
- void abcTest(int n);
- #endif;
- #include "abc.h"
- int global_a;
- void main(void) {
- abcTest(10);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement