Cannot find symbol, which is in static library, in a exe file.
Hi,
First, I created a .cpp file with a global variale:
class T
{
};
T t;
then compile this cpp file into a static library (.a file);
then I created another cpp file with a blank "main" function and compile it to a exe file linking with preivous static library I created.
then I tried "nm exefile | grep t", but I failed to find the global variable "t" in this exe file.
Is there someone help on this?
Thank you!
|