Blog Ronald

Welcome to my Blog

Archive for the ‘C++’ Category

undefined reference to typeinfo – C++ error message

Posted by T. Ronald S. on September 13, 2009

This error message made me scratching my head for hour

g++ -o polygon shape.o circle.o square.o polygon.o
circle.o(.gnu.linkonce.r._ZTI6Circle+0x8): undefined reference to `typeinfo for Shape'
square.o(.gnu.linkonce.r._ZTI6Square+0x8): undefined reference to `typeinfo for Shape'
polygon.o(.gnu.linkonce.t._ZN5ShapeC2Ev+0x8): In function `Shape::Shape()':
: undefined reference to `vtable for Shape'
collect2: ld returned 1 exit status

To fix this?

- undefined reference to typeinfo:
got this line? virtual float getarea() ;
that should read virtual float getarea() {} ;
- undefined reference to vtable means could be there is a virtual function from your interface is not implemented yet.

Posted in C++ | Leave a Comment »

Qtx11 installation on ubuntu8.10

Posted by T. Ronald S. on December 9, 2008

sudo apt-get install build-essential qt4-dev-tools

Posted in C++ | Leave a Comment »

Qtopia installation on ubuntu 8.10

Posted by T. Ronald S. on November 23, 2008

Pre:

Compile gumstix buidroot dan include package tslib (toucscreen)

tar xvf [package qtopia]

cd [dir_qtopia]

CC=arm-linux-gcc  ./configure -embedded arm –prefix=/home/neo/qtopia-arm -qt-mouse-tslib -I/path..to/gumstix-buildroot/build_arm_nofpu/staging_dir/usr/include -L/path_to../gumstix-buildroot/build_arm_nofpu/staging_dir/usr/lib

Posted in C++ | Leave a Comment »