James Carter
Beta member
- Messages
- 2
I am a little rusty with C programming and how to structure multiple file format for successful compilation. I created at .h
file which holds my global variables (global.h). However, using IAR compiler, I get a complaint about one of my vaiables saying
that I am attempting to redefine said variable. I checked to
see if the typing was consistent and it is. I even commented out the variable call in the one file, but the compiler still complains.
I recall that the use of extern is used to deal with these issues of global variables, but I cannot remember how to structure the files. And I don't know whether the use of extern type would even resolve this issue.
file which holds my global variables (global.h). However, using IAR compiler, I get a complaint about one of my vaiables saying
that I am attempting to redefine said variable. I checked to
see if the typing was consistent and it is. I even commented out the variable call in the one file, but the compiler still complains.
I recall that the use of extern is used to deal with these issues of global variables, but I cannot remember how to structure the files. And I don't know whether the use of extern type would even resolve this issue.