Reputation: 57
I am developing a small app in c using turbo c++ IDE.
I defined required constants in header file and included in the source with include directive. I created a project by adding source file.
But while debugging,when i add a header file constant to watch window,it is showing 'undefined symbol'.
Can anyone point me in right direction?
Thanks in advance.
Upvotes: 0
Views: 167
Reputation: 108986
Phase 4 of the compilation process effectively removes any #define
#define FOO 42
/* ... */
int a = FOO;
after phase 4 becomes
/* ... comment deleted in phase 3 */
int a = 42;
There is no FOO
symbol in the produced executable.
Upvotes: 3