This is the mail archive of the gcc-help@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]

C++ undefined symbol



    Hi all,


I have done a back end for our target (a virtual machine) on gcc-2.95.2.
The C works fine but not the C++. If I try to compile this code:

class a
{
 public:
   static long i;
   void foo() {i = 0;}
};

main()
{
 a* A = new a;
 A->foo();
}

The i attributs is correctly use (as __static_1a_i) but never declared
in the assembler code
produced by g++.


Any hints why ?.


Thanks for all.
ogarbil@palmware.fr


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]