[uClibc]C++ and uClibc
David McCullough
davidm at lineo.com
Thu Aug 23 07:50:17 UTC 2001
Jivin Fabio Parodi lays it down ...
> Is there anyone with some experience with C++ and uClibc?
> I'm trying to link some C++ code with uClibc but I get errors.
> I don't want to use the C++ standard library - just write some plain C++
> code.
>
> For example, this block works fine:
>
> class A {
> public:
> void hello();
> };
> void A::hello() { printf("hello\n"); }
>
> But if I make A::hello() virtual, I get errors:
>
> class A {
> public:
> virtual void hello();
> };
> void A::hello() { printf("hello\n"); }
I don't know what your errors were but the following worked for me:
#include <stdio.h>
class A {
public:
virtual void hello();
};
void A::hello() { printf("hello\n"); }
main()
{
}
with the compile line:
m68k-elf-g++ -m5200 -o test test.cc -lc -lgcc
Cheers,
Davidm
--
David McCullough: Ph: +61 7 3435 2815 Lineo (Where Open Meets Smart)
davidm at lineo.com Fx: +61 7 3891 3630 825 Stanley St., W'gabba QLD 4102, Oz
More information about the uClibc
mailing list