undefined reference to main when compiling with gtk+

Report bugs, bug fixes and workarounds here.
Topic author
Darkbolt
Posts: 32
Joined: 11.07.2002
With us: 22 years 4 months
Contact:

undefined reference to main when compiling with gtk+

Post #1by Darkbolt » 29.07.2003, 05:41

Hi, I've been able to succesfully compile celestia using qt....However personally I find qt rather repulsive, and slow, opposed to gtk. However, When I compile it for qt using

./configure --with-gtk , I get an error about gnomeConf.sh. When I configure it with ./configure --with-gtk --gtk-prefix=/usr/lib --without-gnome , I get an undefined reference to 'main' error

For further information, I'm using slackware 9.0, with gcc 3.2, glibc 2.3.1, and if it makes any difference I have mesa 5.0 installed, and i'm using the nvidia drivers (4363)....I've noticed a few people have had this problem in the past, but the only way they've been able to compile it is with qt...So if anyone knows a fix allowing gtk, or can offer some sort of assistance, I'd be greatly appreciative :)

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #2by Christophe » 29.07.2003, 10:11

I don't think you can compile Celestia with GTK and without Gnome. There is no pure GTK version, some Gnome functions are needed. In addition it is Gnome 1.x that is needed, if you have Gnome 2.x only that explains the gnomeConf.sh error.

The Gnome/GTK version is not actively maintained anymore. The current developer team will not port it to Gnome 2, so unless someone volunteers the situation will stay unsatisfactory for Gnome lovers.

I don't understand what you mean when you say you find Qt 'repulsive'? A toolkit is a toolkit, from the user's standpoint there isn't that much difference between GTK and Qt.
Christophe

jamarsa
Posts: 326
Joined: 31.03.2003
With us: 21 years 7 months
Location: San Sebastian (Spain)

Post #3by jamarsa » 29.07.2003, 20:03

Christophe wrote:I don't understand what you mean when you say you find Qt 'repulsive'? A toolkit is a toolkit, from the user's standpoint there isn't that much difference between GTK and Qt.


Touched in your "sensitive" point, aren't you, Christophe? :wink:

Indeed, he refers tho the KDE-GNOME rivalry... Or perhaps the 'slot' approach of Qt?

I agree that KDE is more mature and active now, but i see it as a bit bloated and non scalable on features, while a little rough in the "artistic" sense. Personal preferences, of course... 8)

Topic author
Darkbolt
Posts: 32
Joined: 11.07.2002
With us: 22 years 4 months
Contact:

Post #4by Darkbolt » 29.07.2003, 22:16

Qt is ugly plain and simple...Mosfet may have worked some wonders, but it's still a slow, resource pig.

when you start up an app with qt, it starts up a background app callled 'kdeinit' which takes up its fair bit of ram

I dont have gnome1.4 installed, I upgraded to 2.2.2, which explains it indeed

jamarsa
Posts: 326
Joined: 31.03.2003
With us: 21 years 7 months
Location: San Sebastian (Spain)

Post #5by jamarsa » 29.07.2003, 23:56

Hey, my Zaurus works under Qt (Qtopia) and is quick, simple, efficient and beautiful!! So don't scare the poor child!!

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #6by Christophe » 30.07.2003, 12:44

Darkbolt wrote:Qt is ugly plain and simple...Mosfet may have worked some wonders, but it's still a slow, resource pig.

Both Qt and GTK being fully themable I really don't understand that reasoning about the 'look' of the toolkit. The perceived speed is another point, I personaly don't find a big difference in speed between GTK or KDE apps, but that's probably system dependant too.

Darkbolt wrote:when you start up an app with qt, it starts up a background app callled 'kdeinit' which takes up its fair bit of ram


kdeinit is simply a mean of preloading KDE's main libraries, it doesn't take any RAM that wouldn't be used by the app anyway. However you can probably discuss the relative memory requirement of the same app using KDE or Gnome, but I've never seen a convincing study about this. Using either KDE or Gnome my computer doesn't swap, and that's all that matters to me.
Christophe

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #7by Christophe » 30.07.2003, 12:55

jamarsa wrote:Touched in your "sensitive" point, aren't you, Christophe? :wink:


No, I'm not a Qt/KDE bigot, I don't like people making that kind of religious unmotivated clame: KDE/Gnome stinks, Gnome/KDE rules. I find it especially laughable since from the user perspective there is very little difference between the two. I can understand someone prefering one to the other, but such rejection of one and adulation of the other is just nonsense to me.
Christophe

jamarsa
Posts: 326
Joined: 31.03.2003
With us: 21 years 7 months
Location: San Sebastian (Spain)

Post #8by jamarsa » 30.07.2003, 17:13

Christophe wrote: I don't like people making that kind of religious unmotivated clame: KDE/Gnome stinks, Gnome/KDE rules


Ah, yes, that's the most stupid attitude in the Gnu/Linux world. As I said before, its a matter of personal tastes; and while I prefer Gnome for the desktop, I run KDE apps often within Gnome, and the opposite. In my PDA, however, I run a Qt-based interface, and I'm pleased with it.

Topic author
Darkbolt
Posts: 32
Joined: 11.07.2002
With us: 22 years 4 months
Contact:

Post #9by Darkbolt » 30.07.2003, 19:50

Christophe wrote:
Darkbolt wrote:Qt is ugly plain and simple...Mosfet may have worked some wonders, but it's still a slow, resource pig.

Both Qt and GTK being fully themable I really don't understand that reasoning about the 'look' of the toolkit. The perceived speed is another point, I personaly don't find a big difference in speed between GTK or KDE apps, but that's probably system dependant too.

Darkbolt wrote:when you start up an app with qt, it starts up a background app callled 'kdeinit' which takes up its fair bit of ram

kdeinit is simply a mean of preloading KDE's main libraries, it doesn't take any RAM that wouldn't be used by the app anyway. However you can probably discuss the relative memory requirement of the same app using KDE or Gnome, but I've never seen a convincing study about this. Using either KDE or Gnome my computer doesn't swap, and that's all that matters to me.

My point is they take up too much ram to begin with....20+mb for something as simple as kppp?...Not worth using.

Overall I try to use gtk/gtk2 apps when available

yes qt/kde is completely themeable,but I personally dont like going into kde to theme it, quite frankly because if I didnt have celestia installed, I wouldnt have kde/qt installed either...So I think it's a shame that it no longer supports gtk
Image

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #10by Christophe » 31.07.2003, 10:19

Darkbolt wrote:My point is they take up too much ram to begin with....20+mb for something as simple as kppp?...Not worth using.

Overall I try to use gtk/gtk2 apps when available

Of course, I understand that, using KDE apps from Gnome or Gnome apps from KDE uses memory since you have to have both library sets loaded at the same time.

Darkbolt wrote:yes qt/kde is completely themeable,but I personally dont like going into kde to theme it, quite frankly because if I didnt have celestia installed, I wouldnt have kde/qt installed either...So I think it's a shame that it no longer supports gtk


Well, that's exactly what I thought when I found Celestia: what a shame that there is no KDE version... and that's when I started coding a KDE app for the first time. It's up to you to start coding for Gnome 2 or find someone willing to.
Christophe

Topic author
Darkbolt
Posts: 32
Joined: 11.07.2002
With us: 22 years 4 months
Contact:

Post #11by Darkbolt » 01.08.2003, 06:02

Still, even if I dont have gnome1.4 installed I should still be able to utilize gtk1.2, which I can, and do (with gimp, though now i'm using the dev. version which has gkt2 support...xmms also makes use of gtk1.2)...Unfourtunetly I dont know how to program in either c++ or gtk...Otherwise i would gladly spend time making it gtk2 compatible
Image

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #12by Christophe » 01.08.2003, 11:04

Darkbolt wrote:Still, even if I dont have gnome1.4 installed I should still be able to utilize gtk1.2, which I can, and do (with gimp, though now i'm using the dev. version which has gkt2 support...xmms also makes use of gtk1.2)...Unfourtunetly I dont know how to program in either c++ or gtk...Otherwise i would gladly spend time making it gtk2 compatible


Are you sure you don't have the Gnome 1.x libraries installed? If you use Gimp and Xmms I think you do, you're probably just missing the -dev package to be able to build the GTK version of Celestia.
Christophe

Topic author
Darkbolt
Posts: 32
Joined: 11.07.2002
With us: 22 years 4 months
Contact:

Post #13by Darkbolt » 01.08.2003, 19:13

you do not need gnome to use gimp atall, the only thing they have in common is gtk. I do not have the gnome 1.4 libraries installed.

as for the devel packages, I compiled gtk-1.2 from source, so it should have all of them
Image

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #14by Christophe » 02.08.2003, 14:25

You don't need libgnome to run the Gimp but you do need the glib which is also part of the Gnome library set. I got confused.

To build Celestia you need in addition to gtk and gtk-devel, the libgnome and libgnome-devel packages in their 1.x versions.
Christophe

Topic author
Darkbolt
Posts: 32
Joined: 11.07.2002
With us: 22 years 4 months
Contact:

Post #15by Darkbolt » 03.08.2003, 19:11

glib is not part of the gnome library set, it's a dependency of gtk, so in order to run gnome ( which is gtk based obviously) you need it

The devs that make gtk are the ones that make glib
Image

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #16by Christophe » 03.08.2003, 20:02

Darkbolt wrote:glib is not part of the gnome library set


That depends on what you call the Gnome Library Set. In any case it is listed on the Gnome API Reference page.
Christophe


Return to “Bugs”