[uClibc]Constructor bug?
rich_wilson at agilent.com
rich_wilson at agilent.com
Wed Aug 7 22:51:58 UTC 2002
That was fast!
That fixed it.
Thanks, Phil.
Rich
Rich Wilson
Agilent Technologies
425-335-2245
rich_wilson at agilent.com
> -----Original Message-----
> From: Phil Hopely [mailto:phil at ayrnetworks.com]
> Sent: Wednesday, August 07, 2002 3:46 PM
> To: rich_wilson at agilent.com
> Cc: uclibc at uclibc.org
> Subject: Re: [uClibc]Constructor bug?
>
>
>
> I'm not sure about the c++ case, but perhaps try adding the
> cli argument
> --uclibc-ctors as a cflag while compiling your main() below -
> as per if
> this file were foo.c:
>
> ppc-uclibc-gcc --uclibc-ctors foo.c -o foo
>
> The uclibc wrapper does not compile w/ constructor support by
> default...
>
>
> Phil
>
> rich_wilson at agilent.com wrote:
>
> >I seem to have a problem with constructors for global
> objects not being
> >called. I'm using power-pc. I have uClibc version 0.9.12.
> >
> >A program which demonstrates the problem is:
> >=========================================
> >#include <stdio.h>
> >class xx
> >{
> > public:
> > xx() { printf("This is xx constructor\n"); }
> >};
> >xx xxs;
> >main()
> >{
> > printf("this is main\n");
> >}
> >=========================================
> >Using the default libc, this program prints
> >
> >This is xx constructor
> >this is main
> >
> >but when recompiled with uClibc, it prints only
> >
> >this is main
> >
> >
> >Since I just subscribed to this list 2 minutes ago, I don't know if
> >this has been a topic in the recent past, or if there's another
> >way I should report this.
> >
> >Rich
> >
> >Rich Wilson
> >Agilent Technologies
> >425-335-2245
> >rich_wilson at agilent.com
> >_______________________________________________
> >uClibc mailing list
> >uClibc at uclibc.org
> >http://uclibc.org/mailman/listinfo/uclibc
> >
>
>
More information about the uClibc
mailing list