Re: [gtkmm] Newbie in gtkmm and c++ under linux
- From: Daniel Lynch <offmore sbcglobal net>
- To: Eric Lussier <ericlussier75 hotmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] Newbie in gtkmm and c++ under linux
- Date: Fri, 30 Apr 2004 13:16:34 -0700
You need to also compile helloworld.cc, IE:
g++ main.cc helloworld.cc -o helloworld `pkgconfig gtkmm-2.0 --libs
--clfags`
Oh, and I had problems following the gtkmm-2.4 guide while using
gtkmm-2.0.
>From the tutorial on the web it says:
m_button.signal_clicked().connect(sigc::mem_fun(*this,
&HelloWorld::on_button_clicked));
I got an error about an undeclared reference to 'sigc' when I tried
compiling to that, if I remember correctly.
But in the tutorial in /usr/share/docs/gtkmm-2.0/ the Hello World
tutorial says to do:
m_button.signal_clicked().connect(SigC::slot(*this,
&HelloWorld::on_button_clicked));
Which worked fine. I'm not sure why that is, maybe someone can explain
it to me?
On Fri, 2004-04-30 at 12:14, Eric Lussier wrote:
> Hello every one, I am a programmer but a newbie in programming gtkmm and
> also a newbie in programming C++ under linux.
>
> I am trying to compile the "Hello world" program of gtkmm documentation
> from:
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch03s06.html
>
> and I get this message on the shell:
> [root myhost cpp]# make
> g++ main.cc -o main `pkg-config gtkmm-2.0 --libs --cflags`
> /tmp/ccE2Gp6W.o(.text+0x2f): In function `main':
> : undefined reference to `HelloWorld::HelloWorld[in-charge]()'
> /tmp/ccE2Gp6W.o(.text+0x4d): In function `main':
> : undefined reference to `HelloWorld::~HelloWorld [in-charge]()'
> /tmp/ccE2Gp6W.o(.text+0x73): In function `main':
> : undefined reference to `HelloWorld::~HelloWorld [in-charge]()'
> collect2: ld returned 1 exit status
> make: *** [all] Error 1
> [root myhost cpp]#
>
> I have checked the code about 10 times and it is exactly the same as on the
> example site's page.
>
> Does anyone have an idea of what i am doing wrong?
>
> Thanks.
>
> _________________________________________________________________
> MSN Messenger : discutez en direct avec vos amis !
> http://messenger.fr.msn.ca/
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]