This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Trying to debug include files

i have a main program with some include files, and i want to debug this files as well as the main program and use breakpoinds.
Anyone knows how to do this???
Thanks

Parents
  • At the top of all the files OTHER than main that use these variables, you must put an "extern" declaration

    No. As I keep pointing out, pretty much every occurence of the word 'extern' in a .c file is a design error.

    You should have this 'extern' in a header file instead, and #include that in exactly those source files that refer to it, including the one that holds the definition of the variable in question.

Reply
  • At the top of all the files OTHER than main that use these variables, you must put an "extern" declaration

    No. As I keep pointing out, pretty much every occurence of the word 'extern' in a .c file is a design error.

    You should have this 'extern' in a header file instead, and #include that in exactly those source files that refer to it, including the one that holds the definition of the variable in question.

Children
No data