This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I discovered a strange property of C++ regarding symbols. If you just code
// file foo1.cc extern "C" { const int twosymb=2; };
the resulting foo1.o does not define a twosymb symbol (I expected that it does). You have to code
// file foo2.cc extern "C" { extern const int twosymb; const int twosymb=2; };
to get a symbol "twosymb" in foo2.o
-- Marc Glisse
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |