[Glade-users] compiling flags (gtk2 --> gtk3)
Tristan Van Berkom
tristanvb at openismus.com
Mon Oct 24 03:04:00 EDT 2011
On Sun, 2011-10-23 at 18:00 -0700, David Buchan wrote:
> Oh my gosh. I'm going to sound like an idiot here.
>
>
> Take g_malo0 () as an example.
> Am I correct is understanding that functions like g_malloc0() no
> longer exist and there is a new
> function in it's place for gtk+ 3? Or are thing done in a different
> way?
>
>
>
> I looked at the section discussing converting your apps to gtk+3, but
> i didn't see anything about
> new functions for malloc & friends.
>
>
> I got scared and installed libgtk2.0-dev, and went back to my original
> makefile, but I still can't compile.
> I get all the same errors. This is scaring me, as it was fine for 6
> months, and now it seems I can't even compile
> with GTK2.
>
>
> Can you provide more guidance? Is there a cross-reference of 2 versus
> 3 or something.
Oh my, of course there is a porting guide:
http://developer.gnome.org/gtk3/3.2/gtk-migrating-2-to-3.html
Sorry for the confusion, you should really be posting to a GTK+
list (gtk-list or gtk-app-devel-list) for issues you have with
porting your GTK+ app (you will get a faster response there because
you are on topic and there are much more users).
This list is more about using the Glade tool, but I'm happy to answer
your questions when I have time.
Cheers,
-Tristan
> I'm completely bamboozled.
>
>
> Dave
>
>
>
>
> ______________________________________________________________________
> From: Tristan Van Berkom <tristanvb at openismus.com>
> To: David Buchan <pdbuchan at yahoo.com>
> Cc: Glade List <glade-users at lists.ximian.com>
> Sent: Saturday, October 22, 2011 10:20 PM
> Subject: Re: [Glade-users] compiling flags (gtk2 --> gtk3)
>
> On Sat, 2011-10-22 at 19:07 -0700, David Buchan wrote:
> > Hi guys,
> >
> >
> > I did indeed have -Wall. All compiler options are:
> >
> >
> > CC = gcc
> > CCFLAGS = `pkg-config --cflags gtk+-3.0 gmodule-2.0`
> > LIBS = `pkg-config --libs gtk+-3.0 gmodule-2.0`
> > DEBUG = -Wall -g
> >
> >
> >
> > I only gave a sample of the error messages.
> > I went through them all and they're all like the ones below, except
> at
> > the end, where is says:
>
> Right, usually though, you dont care about the linker error.
>
> ... until you've fixed all the compiler warnings mentioning
> unresolved symbols...
>
> You will be more interested in the compiler warnings because
> they will tell you exactly where in your source code that you
> are mentioning missing symbols such as 'g_threads_got_initialized'
>
> ... while you go ahead and modify your source to use new and
> updated apis, after fixing those compiler warnings... you
> should not get the linker error anymore.
>
> Cheers,
> -Tristan
>
> >
> >
> > collect2: ld returned 1 exit status
> > make: *** [x] Error 1
> >
> >
> >
> >
> ______________________________________________________________________
> > From: Tristan Van Berkom <tristanvb at openismus.com>
> > To: David Buchan <pdbuchan at yahoo.com>
> > Cc: Glade List <glade-users at lists.ximian.com>
> > Sent: Saturday, October 22, 2011 9:35 PM
> > Subject: Re: [Glade-users] compiling flags (gtk2 --> gtk3)
> >
> > On Sat, 2011-10-22 at 17:47 -0700, David Buchan wrote:
> > > I recently formatted my drive and installed the latest Ubuntu
> > > distribution of glade
> > > and I installed libgtk-3-dev.
> > >
> > >
> > > In my make file, I used to have:
> > >
> > >
> > > CCFLAGS = `pkg-config --cflags gtk+-2.0 gmodule-2.0`
> > > LIBS = `pkg-config --libs gtk+-2.0 gmodule-2.0`
> > >
> > >
> > > I've changed it to:
> > >
> > >
> > > CCFLAGS = `pkg-config --cflags gtk+-3.0 gmodule-2.0`
> > > LIBS = `pkg-config --libs gtk+-3.0 gmodule-2.0`
> > >
> > >
> > > I left the gmodule as 2.0, as it couldn't find 3.0
> > >
> > >
> > > I made no changed to my source code.
> > >
> > >
> > > It compiles but won't link. I bombs with tons of errors such as:
> > >
> > >
> > > /x.c:43: undefined reference to `g_threads_got_initialized'
> > > /x.c:44: undefined reference to `g_thread_init'
> > > /x.c:46: undefined reference to `gtk_init'
> > > /x.c:49: undefined reference to `g_malloc0'
> > > etc etc...
> > >
> > >
> > > What am I doing wrong?
> >
> > Adding -Wall would be a good start.
> >
> > >
> > >
> > > Any tips would be appreciated.
> > >
> > >
> > > Dave
> > >
> > > _______________________________________________
> > > Glade-users maillist - Glade-users at lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/glade-users
> >
> >
> >
> >
> >
>
>
>
>
>
More information about the Glade-users
mailing list