LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-05-2016, 12:43 PM   #1
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 645
Blog Entries: 126

Rep: Reputation: 186Reputation: 186
compiling old gtk-using program on a gtk2 system


The distro I am using atm has gtk2 and 3, and apparetnly no gtk. I am attempting to compile an older program. This fails because the older program was written for gtk.

Googling reveals many things, including this: https://developer.gnome.org/gtk2/sta...compiling.html

In the Makefile (note: the program in question does not have a ./configure, just a Makefile) I found:
Code:
mindguard: mindguard.c mindguard.h 
	$(CC) `gtk-config --cflags`  mindguard.c -o mindguard `gtk-config --libs`
And changed it to:
Code:
mindguard: mindguard.c mindguard.h 
	$(CC) `pkg-config --cflags gtk+-2.0`  mindguard.c -o mindguard `pkg-config --libs gtk+-2.0`
note: mindguard is the program in question and it is no longer supported (author does not answer emails and there is no associated forum).

That also fails. Though the error messages differ from before, they are incomprehensible.

It seems that there must be a simple general-case system of compiling gtk programs for gtk2. it seems this would be a common task? And thus there should be a simple and common solution? Something google is overlooking? If so, could someone let me know? Thank you.

Last edited by jr_bob_dobbs; 06-05-2016 at 12:48 PM.
 
Old 06-05-2016, 01:11 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,612

Rep: Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649Reputation: 2649
then install gtk-dev ( or gtk-devel)

mindguard builds just fine on m opensuse 42.1 64 install

Last edited by John VV; 06-05-2016 at 01:13 PM.
 
Old 06-06-2016, 03:53 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,492

Rep: Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639
Quote:
it seems this would be a common task ?
The ´Apr 2001´ gtk+-1.2.10 :

Fedora, CentOS # yum install gtk+-devel

Debian, Ubuntu, Mint : No libgtk1.2-dev for years. 2009 ?
( You can (temporarily) add an old OS version to /etc/apt/sources.list ).


-
 
Old 06-13-2016, 07:11 AM   #4
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 645

Original Poster
Blog Entries: 126

Rep: Reputation: 186Reputation: 186
Thank you, everyone, for the replies.

Looks like yet another distro switch may be in order for me. D'oh!
 
  


Reply

Tags
gtk+


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+ program not compiling YayIguess Programming 5 07-21-2015 11:17 PM
Compiling a C program with openGL, GLEW and GTK in ubuntu. sanehussain Linux - Newbie 1 02-18-2012 09:07 PM
GTK-Critical error compiling a smart program (with menu) clarci Programming 1 06-18-2009 03:58 PM
Difference between gtk, gtk2 and gtk+ aregmi Linux - Software 1 05-29-2007 11:34 PM
compiling kino, gtk test program cant run vance Linux - Software 1 06-02-2003 04:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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