LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-14-2004, 06:56 PM   #1
tutwabee
Member
 
Registered: Jan 2004
Location: California
Distribution: Ubuntu 10.04
Posts: 145

Rep: Reputation: 15
gtk with c++


I am currently learning C++ and use g++ to compile my scripts. I have heard of gtkmm and gtk-- which to my understanding allow you to use GTK to make GUIs with C++. I couldn't get gtkmm's many packages to configure correctly and I couldn't figure out where to copy the gtk-- files/directories to so that they work when called.

What I want is a simple way for me to import H files that will allow me to create a GUI in my C++ programs.
 
Old 06-15-2004, 03:19 PM   #2
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
gtk-- is the old name for gtkmm. It's just gtkmm now.

What you've hit on is, IMO, the main problem with gtkmm -- getting all the dependencies installed and configured correctly.

If you're using debian or a debian-based distro, I guess you can just apt-get it. Otherwise, good luck.

By the way, you could always use Java instead of C++ and try Java-GNOME
http://java-gnome.sourceforge.net/
 
Old 06-15-2004, 05:06 PM   #3
needforspeed
Member
 
Registered: Aug 2003
Distribution: Gentoo
Posts: 73

Rep: Reputation: 15
I'm having a similar problem...I don't mean to hijack this thread but it's closely related I think. I downloaded gtk+-2.4.3 and did ./configure trying to follow along with the tutorial at http://www.gtk.org/tutorial/ch-gettingstarted.html but when compiling that simple program it said the gtk.h file didn't exist. I found where it installed the files and simply changed the original #include statement to #include<gtk-2.0/gtk/gtk.h>

Now when I compile, pages and pages of errors fly by, from what I can tell, every gtk*.h file has an error like "field 'scale' has incomplete type" and several syntax errors.

So I searched this site and the ./configure --help and tried doing ./configure -prefix=/usr/include/

I then changed the #include to the original statement, and still get all those errors.

I've been searching for several hours for the answer and haven't found one, so can anybody tell me how to get this working?

Using Gentoo with 2.6 kernel and fluxbox, tried reemerging gtk but that didn't help either.
 
Old 06-15-2004, 05:21 PM   #4
zeppelin
Member
 
Registered: Apr 2003
Location: Athens, Greece
Distribution: Arch
Posts: 182

Rep: Reputation: 30
GTKmm is so great..
but there are others you can try [not JAVA!!]
thereis PyGTK and Gnome-python in general,
there is GTK# which I would propose to you instead of JAVA.
both have patent issues and are not so free, there is of course DotGNU that is working in the right direction, but still you'll find a lot of M$ in it

Last edited by zeppelin; 06-15-2004 at 05:25 PM.
 
Old 06-15-2004, 06:53 PM   #5
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
there is GTK# which I would propose to you instead of JAVA.
both have patent issues


I don't think there are patent issues with using Java, but I'm not absolutely certain. Note that both GCJ (GCC) [the Java compiler] and Classpath [the Java standard API implementation] are both official GNU projects. If it's good enough for the FSF, it's good enough for me.

I used to mess with C++, but Java is so much nicer... it spoils you rotten. It's like C++ done mostly right.
 
Old 06-16-2004, 01:27 AM   #6
tutwabee
Member
 
Registered: Jan 2004
Location: California
Distribution: Ubuntu 10.04
Posts: 145

Original Poster
Rep: Reputation: 15
Thank you so much for the answers. I'm thinking about trying Debian soon actually because I have heard good things about apt-get. I will look into the other alternatives also. I hope at least one of them has support for a Windows compiler that accomplishes the same thing because I would like to make cross-platform programs (for all my sad little Windows buddies). I believe that even though Windows may be made by M$ and many think it is evil that it should still be supported. This probably came along my web designing all-browser belief.

Thanks for the replies!
 
  


Reply



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
Freerock uninstall stole GTK looking for up-to-date pango, atk, gtk, glib and xft tgz Oholiab Slackware 8 09-18-2005 11:57 AM
GTK source install doesn't give gtk-config Feebles Linux - Software 4 06-15-2005 12:51 PM
cant find gtk-config file or gtk-devel to install happychappy Linux - Software 2 02-16-2005 12:46 AM
GTK error when starting gtk-chtheme Dswissmiss Linux - Software 1 10-01-2004 11:53 PM
compiling gaim/ gtk error (two versions of gtk) webazoid Linux - Software 0 07-06-2004 06:05 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:15 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