c++clinkerexecutable

Checking for a variable in the executable


Is there a way to know whether a variable is defined, by looking at the executable.

Lets say I declare

int i;

in the main function. By compiling and linking I get an executable my_program.exe.

Now, by looking inside my_program.exe, can I say if it has an int eger variable i ?


Solution

  • Not unless you compile with debugging enabled.