LinuxQuestions.org
Help answer threads with 0 replies.
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 11-18-2005, 05:47 PM   #1
anime4christ
LQ Newbie
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 8

Rep: Reputation: 0
Port a GTK+ app to Windows


Hi, I want to port gLabels to Windows because I still have to use Windows sometimes, and I need to able to access my labels and business cards at all times. But I can't figure out how to do it, I'm not a big c++ person and a newbie to Linux. All I've got the source code, can someone point me in the right direction, I want to make it use the libraries that the GIMP, GAIM, Inkscape, etc. use.
 
Old 11-19-2005, 11:08 AM   #2
BoldKiller
Member
 
Registered: Apr 2002
Location: Montreal, Quebec
Distribution: Debian, Gentoo, RedHat
Posts: 142

Rep: Reputation: 15
Basicly porting invlves these steps:

- find the librairy for the platform you want to port to. In your case, check out for a GTK+ librairy windows version. I dont use GTK, but I know the windows version of the librairy does exist. It is used in the windows port of GAIM.
So get the librairy and install it on your system

- Setup your environment. That one can be tricky. Depending on what compiler you want to use. Mings, cygwin version of gcc, visual studio, etc.
If you use a make file based cmpiler, you will need to get familiar with makefiles. But the make file for the linux port should provide a good starting point.

- Start compiling. ... (that is actually the only easy step!)

- Check out the errors that came out. You might be extremely lucky and not get any errors. But I doubt it. You will most likely get some errors. Now you will need to corret these. The errors you will get will be compile and linkig errors because there might be none portable code in there.
If its the case, you will need to fix those issues.

- redo last 2 steps until you get a fully working application


Note that porting an application is not the easyest task out there. It really depends on the software you want to port. Vrey well written software, will compile "out of the box" on any platform as long as you have the librairies. But you never know until you try it. And errors can be hard to fix.
If you really want to do it, go for it! But be aware its not a project that will only take a few hours. You are looking at a lot of work, speacilly if you are not used to programming.
 
Old 11-19-2005, 11:11 AM   #3
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,552

Rep: Reputation: 180Reputation: 180
"I want to make it use the libraries that the GIMP, GAIM, Inkscape, etc. use."

They use the Gtk+ libraries

"I want to port gLabels to Windows because I still have to use Windows sometimes, and I need to able to access my labels and business cards at all times. But I can't figure out how to do it, I'm not a big c++ person and a newbie to Linux. All I've got the source code, can someone point me in the right direction"

Here is a short online tutorial.

http://www.yolinux.com/TUTORIALS/GTK...mmingTips.html

Here are some examples of using Gtk+

http://linuxheadquarters.com/howto/p...w/window.shtml

You can find some decent Gtk+ books on Amazon.

-----------------------------
Steve Stites

Last edited by jailbait; 11-19-2005 at 03:07 PM.
 
Old 11-19-2005, 02:53 PM   #4
John VV
Guru
 
Registered: Aug 2005
Posts: 13,051

Rep: Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741
re

i havent used that prog. but i do cross build gimp and plugins for fedora and win xp
i use MinGW for win builds . first i would read all the info on building gimp in mingw then do a gimp build ( that way you will have compatable libs . then try a build of gLabels most likley ./configure --with-gtk=//your path
and see tor's page on gtk and gimp
 
Old 11-19-2005, 04:22 PM   #5
anime4christ
LQ Newbie
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks. I'll try the tutorials, and see what I get.
 
Old 11-19-2005, 05:06 PM   #6
anime4christ
LQ Newbie
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
So far, I've actually made a VC++ project out of it. Does anyone know where to get the following header files for Windows? They are required for gLabels:
config.h
e-marshal.h
unistd.h
libbonoboui.h
gnome-font.h
gnome-glyphlist.h
gnome.h
gnome-vfs.h
 
Old 11-19-2005, 07:02 PM   #7
BoldKiller
Member
 
Registered: Apr 2002
Location: Montreal, Quebec
Distribution: Debian, Gentoo, RedHat
Posts: 142

Rep: Reputation: 15
config.h
That is not a standard librairy I regognize. It must be a header of the projet. Check out where they put that. It should be somewhere in the source.

unistd.h
If my memory is corect that one is a unix only header! So you will hae to check exactly what they use in there and provide subtitute.

Not sure where you could find a win32 version of the gnome headers.
 
Old 11-19-2005, 07:33 PM   #8
John VV
Guru
 
Registered: Aug 2005
Posts: 13,051

Rep: Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741
re

hi config.h is part of gtk build and gimp build it is found in the src root dir.
ex. win. c\\src\gtk
look for a file called config.h.in . config.h is built by gcc when you type make

if you are using visual stuido .net you will nead to make this file by hand see config.h.in edit it and rename a copy to config.h
 
Old 11-20-2005, 12:16 AM   #9
anime4christ
LQ Newbie
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
Well, I got the errors down to 79, but I'm missing a few more llibraries now. what can substitute for the gnome libs?

Far as I know, the unistd.h is for the recent file list. What exactly it does, I'm not sure. 80%+ of all the programming I ever did was .NET, maybe less than 5% was C++, never any pure C.

Last edited by anime4christ; 11-20-2005 at 12:22 AM.
 
Old 11-20-2005, 12:24 PM   #10
John VV
Guru
 
Registered: Aug 2005
Posts: 13,051

Rep: Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741Reputation: 1741
re

try grabing the libs from mingw or gnuwin32 and the headers from mingw
and reright a copy fo the win headers to work as the mingw
i my self gave up on this aproch and do ALL my linux to win with mingw and not in visual stuido .net


also have a look hear
http://www.gimp.org/~tml/gimp/win32/downloads.html
for gtk for win

Last edited by John VV; 11-20-2005 at 12:30 PM.
 
Old 11-21-2005, 08:28 PM   #11
anime4christ
LQ Newbie
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
Thnks, I'll try that when I get a chance.
 
  


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
Can't compile sample GTK app slackwarefan Linux - Software 5 07-26-2005 07:57 PM
XID in Gtk APP pulsez Programming 1 07-13-2005 06:12 PM
gtk app problem emg Linux - Software 3 04-30-2005 01:22 PM
Multiplatform sound library for Gtk app Komakino Programming 1 03-20-2004 06:27 PM
Can app port to Windows? MrSuaveh Linux - Newbie 3 07-04-2002 11:37 PM


All times are GMT -5. The time now is 11:37 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration