LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-01-2006, 06:00 PM   #1
ronald-be
Member
 
Registered: Aug 2004
Location: Belgium
Distribution: debian 5.02
Posts: 73

Rep: Reputation: 15
Thumbs down GTK programs refuse to compile


hello,

I'm getting a serious problem with GTK+. All applications refuse to compile, even the simplest.
It never worked out. I'm using a 64-bit version, so I think he doesn't find his labraries. SuSE sucks really as they move things to other locations. I noticed two GTK versions too. Does anyone have a solution for this?
thanx all.

Ronald
 
Old 11-01-2006, 06:21 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
If you posted the errors you're getting, it would be alot easier. The last 20 lines or so when you execute 'make' is usually sufficient. Also tell us what package(s) you're trying to install.

Last edited by weibullguy; 11-01-2006 at 06:22 PM.
 
Old 11-02-2006, 08:35 AM   #3
ronald-be
Member
 
Registered: Aug 2004
Location: Belgium
Distribution: debian 5.02
Posts: 73

Original Poster
Rep: Reputation: 15
Gtk+

Hello,

Well... It was a sample demo of GTK+ which I tried to compile and run without makefile, just using g++. Adding the library in the command-line of g++ doesn't help. This is the code :

#include <gtk/gtk.h>

int main (int argc, char **argv)
{
/* Initialize i18n support */
gtk_set_locale ();

/* Initialize the widget set */
gtk_init (&argc, &argv);

/* Create the main window */
mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);

/* Set up no GUI elements */

/* Show the application window */
gtk_widget_show_all (mainwin);

/* Enter the main event loop, and wait for user interaction */
gtk_main ();

/* The user lost interest */
exit 0
}

Calling the compiler with g++ testgtk.cpp gives (last lines) :

/usr/local/include/gtk/gtkuimanager.h:144: error: expected constructor, destruct or, or type conversion before ‘*’ token
/usr/local/include/gtk/gtkuimanager.h:145: error: variable or field ‘gtk_ui_mana ger_ensure_update’ declared void
/usr/local/include/gtk/gtkuimanager.h:145: error: ‘GtkUIManager’ was not declare d in this scope
/usr/local/include/gtk/gtkuimanager.h:145: error: ‘self’ was not declared in thi s scope
/usr/local/include/gtk/gtkuimanager.h:146: error: ‘guint’ does not name a type
/usr/local/include/gtk/gtkuimanager.h:148: error: ‘G_END_DECLS’ does not name a type
/usr/local/include/gtk/gtkvbbox.h:50: error: ‘GtkButtonBox’ does not name a type
/usr/local/include/gtk/gtkvbbox.h:59: error: ‘GType’ does not name a type
/usr/local/include/gtk/gtkvbbox.h:73: error: ‘G_END_DECLS’ does not name a type
/usr/local/include/gtk/gtkvpaned.h:49: error: ‘GtkPaned’ does not name a type
/usr/local/include/gtk/gtkvpaned.h:57: error: ‘GType’ does not name a type
/usr/local/include/gtk/gtkvpaned.h:61: error: ‘G_END_DECLS’ does not name a type
/usr/local/include/gtk/gtkvruler.h:61: error: ‘GtkRuler’ does not name a type
/usr/local/include/gtk/gtkvruler.h:70: error: ‘GType’ does not name a type
/usr/local/include/gtk/gtkvruler.h:74: error: ‘G_END_DECLS’ does not name a type
/usr/local/include/gtk/gtkvscale.h:51: error: ‘GtkScale’ does not name a type
/usr/local/include/gtk/gtkvscale.h:60: error: ‘GType’ does not name a type
/usr/local/include/gtk/gtkvscale.h:61: error: ‘GtkAdjustment’ was not declared i n this scope
/usr/local/include/gtk/gtkvscale.h:61: error: ‘adjustment’ was not declared in t his scope
/usr/local/include/gtk/gtkvscale.h:62: error: ‘gdouble’ was not declared in this scope
/usr/local/include/gtk/gtkvscale.h:63: error: ‘gdouble’ was not declared in this scope
/usr/local/include/gtk/gtkvscale.h:64: error: ‘gdouble’ was not declared in this scope
/usr/local/include/gtk/gtkvscale.h:64: error: initializer expression list treate d as compound expression
/usr/local/include/gtk/gtkvscale.h:67: error: ‘G_END_DECLS’ does not name a type
/usr/local/include/gtk/gtkvseparator.h:51: error: ‘GtkSeparator’ does not name a type
/usr/local/include/gtk/gtkvseparator.h:60: error: ‘GType’ does not name a type
testgtk.cpp:3: error: expected constructor, destructor, or type conversion befor e ‘int’

It seems it doesn't find its libraries. Should I remove and re-install GTK or is there a 64-bit problem (e.g. pointer format 64 bits instead of 32)? Is the compiler call OK?

Thanx

Ronald
 
Old 11-03-2006, 05:05 PM   #4
ronald-be
Member
 
Registered: Aug 2004
Location: Belgium
Distribution: debian 5.02
Posts: 73

Original Poster
Rep: Reputation: 15
still GTK...

Hello all,

Checked installed packages : some parts of glade were missing. I Wonder if GTK is complete. Building a GTK-application with glade seems ok, except... After closing the main window it doesn't kill its process... (did ps -A). I only provide a main window. Checked C++ builder under Windows but the structures seem to be the same. However I can't check the code for the widgets there. Any ideas for the reason of this hanging?

Thanx

Ronald
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GTK+ programs on Windows without having to install GTK+, GLib, etc Nylex Programming 2 02-19-2006 01:33 PM
some programs refuse to open dianat100 Linux - Newbie 5 06-08-2005 06:29 AM
X based programs refuse to work when suid is used in slackware 9.1. Have nvidia 5328 natalinasmpf Linux - General 0 01-01-2004 10:22 AM
Can't compile gtk+ programs =\ EnigmaX Linux - Software 19 09-17-2003 05:41 PM
Programs refuse to close sometime... TippyToes Linux - General 3 08-13-2003 05:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 08:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration