Pelles C forum

C language => Graphics programming => Topic started by: bullygram on August 28, 2011, 08:05:35 pm

Title: How To GTK+ in Pellec
Post by: bullygram on August 28, 2011, 08:05:35 pm
How to use GTK+ in Pellec. Please tell me what should  I do in order to download and set up.
In project > Folders, I even included the include and the library files and still I am unsuccessful.  :(
Title: Re: How To GTK+ in Pellec
Post by: CommonTater on August 28, 2011, 11:10:51 pm
You may find some help here ....   http://www.gtk.org/documentation.php

However, you might also want to give some thought to why you would want to use a wrapper library and custom widgets when the Windows API has such a rich set of features built right into the operating system.  Also Pelles C includes all the necessary headers and libs to begin Windows API programming as soon as you install.

Take a peek here ...  http://www.winprog.org/tutorial/   for a "getting started" level introduction to Windows API...
And, of course, look around in the Pelles C help file...
Title: Re: How To GTK+ in Pellec
Post by: bullygram on August 29, 2011, 08:51:21 am
I just want to do some cross platform GUI programming in C. Is there any other avabliable apart from GTK+ and Windows API?
Title: Re: How To GTK+ in Pellec
Post by: TimoVJL on August 29, 2011, 09:26:03 am
What errors you get ?

This far:
- use define G_HAVE_ISO_VARARGS for includes

Add least these include paths:
..\include\gtk-2.0;..\include\cairo;..\include\glib-2.0;..\lib\glib-2.0\include;..\include\pango-1.0;..\lib\glib-2.0;..\lib\gtk-2.0;..\lib\gtk-2.0\include;..\include\atk-1.0

PS: better not to use GTK for small programs (or any).
Title: Re: How To GTK+ in Pellec
Post by: CommonTater on August 29, 2011, 02:59:47 pm
I just want to do some cross platform GUI programming in C. Is there any other avabliable apart from GTK+ and Windows API?

You will find similar complexities with any third party library.  Always you have to put them some place (NOT directly in the Pelles C includes and libs folders) then add their includes and libs to your project paths as Timo explained...  Very often you will need to recompile them as well. 

I take it you understand that "crossplatform" only works at the source code level.  That is, to have the same app on Linux you will need to recompile it on Linux using a linux compiler like GCC... It might be simpler to work in Windows API and run them under an emulator on other OSs... Use Wine for Linux, and there's one for the Mac too...

In any case there are multiple libraries you can work with... but beware most are C++ or C#.

Google is your friend.... http://www.google.ca/search?q=wxwidgets&rls=com.microsoft:en-ca&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1&redir_esc=&ei=WoxbTum1J6ja0QGatYGUCQ#pq=c+cross+platform+library&hl=en&cp=30&gs_id=20&xhr=t&q=c+cross+platform+library++-c%2B%2B&pf=p&sclient=psy&rls=com.microsoft:en-ca&source=hp&pbx=1&oq=c+cross+platform+library++-c%2B%2B&aq=f&aqi=&aql=&gs_sm=&gs_upl=&bav=on.2,or.r_gc.r_pw.&fp=95d6da40cb95822a&biw=1157&bih=842



Title: Re: How To GTK+ in Pellec
Post by: faris on December 31, 2013, 01:48:06 pm
I take it you understand that "crossplatform" only works at the source code level.  That is, to have the same app on Linux you will need to recompile it on Linux using a linux compiler like GCC.is that okay?
Title: Re: How To GTK+ in Pellec
Post by: Persay on March 04, 2014, 10:25:09 am
Say you want to run a specific version of GTK on Linux Ubuntu. And you want to know what version of Ubuntu it comes in so you don't have to build GTK manually (NOT RECOMMENDED) you can do a search here: http://packages.ubuntu.com/
Title: Re: How To GTK+ in Pellec
Post by: rweidner on September 17, 2014, 07:22:37 pm
Topic also discussed here.

http://forum.pellesc.de/index.php?topic=4713.msg20943#msg20943

--
Ron