Total Begginer
- From: "Vinicius G. D. Menezes" <vini bill gmail com>
- To: gtkmm-list gnome org
- Subject: Total Begginer
- Date: Sat, 25 Apr 2009 16:39:14 -0300
Hi Guys. How are you doing?
I started studing GTKmm and I got some really strange results when trying to compile the book's source code (
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-helloworld.html). First let me give some info about my system (It's a very bloated Ubuntu 8.10 installation =] ):
==== result of "gcc -v" ====
vinicius vinicius-devcenter:~$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu12' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)
==== result of "pkg-config gtkmm-2.4 --libs --cflags" ====
vinicius vinicius-devcenter:~$ pkg-config gtkmm-2.4 --libs --cflags
-I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/giomm-2.4 -I/usr/lib/giomm-2.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/include/atkmm-1.6 -I/usr/include/gtk-2.0 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/include/cairomm-1.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0 -lgtkmm-2.4 -lgiomm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lgtk-x11-2.0 -lpangomm-1.4 -lcairomm-1.0 -lglibmm-2.4 -lsigc-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lz -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
the command i'm using to compile is a bit different:
g++ -g helloworld.cc $(pkg-config --libs --cflags gtkmm-2.4) -o main
==== The compilation process halts with the following messages ====
vinicius vinicius-devcenter:~/Download$ g++ main.cc $(pkg-config --libs --cflags gtkmm-2.4) -o main
/tmp/cculXxU3.o: In function `main':
main.cc:(.text+0x3f): undefined reference to `HelloWorld::HelloWorld()'
main.cc:(.text+0x61): undefined reference to `HelloWorld::~HelloWorld()'
main.cc:(.text+0x8b): undefined reference to `HelloWorld::~HelloWorld()'
collect2: ld returned 1 exit status
Am I doing something wrong? I've been testing a lot but I just can't figure out what is happening (I'm a recent Linux programmer, sorry if it's just a stupid mistake of my part).
Vinicius Menezes
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]