User avatar
bonzadog
Posts: 256
Joined: Wed Apr 25, 2012 9:40 am
Location: Rietberg/Germany

Geany

Thu Dec 28, 2017 11:04 am

28.12.2017
Hello all,
Stretch, RPi3

I have installed geany sudo apt-get install geany and get what appears to be an antiquated version from 2014.
I also want a debugger as well which I hope to install via sudo install geany-plugins
As far as I am concerned an IDE must have a decent debugger.

My question is:
1) will there a Raspberrypi.org update to geany version 1.32 soon (ie a new apt-get install)?

1a) if not, then I must compile etc myself but on geany.org these seem to be a lot of required dependencies and I am unsure how to proceed - perhaps someone could point me to some pages?

For SW development, I like using IDE's and am no fan of CLI commands.

Any tips most welcome - thank you in advance

fruitoftheloom
Posts: 23132
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Geany

Thu Dec 28, 2017 1:43 pm

bonzadog wrote:
Thu Dec 28, 2017 11:04 am
28.12.2017
Hello all,
Stretch, RPi3

I have installed geany sudo apt-get install geany and get what appears to be an antiquated version from 2014.
I also want a debugger as well which I hope to install via sudo install geany-plugins
As far as I am concerned an IDE must have a decent debugger.

My question is:
1) will there a Raspberrypi.org update to geany version 1.32 soon (ie a new apt-get install)?

1a) if not, then I must compile etc myself but on geany.org these seem to be a lot of required dependencies and I am unsure how to proceed - perhaps someone could point me to some pages?

For SW development, I like using IDE's and am no fan of CLI commands.

Any tips most welcome - thank you in advance

Geany 1.29 in Stretch was released November 2016, so stable at time of Debian Stretch freeze:

https://packages.debian.org/stretch/geany



You can build from Source Package:

https://www.geany.org/Download/Releases
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

User avatar
bonzadog
Posts: 256
Joined: Wed Apr 25, 2012 9:40 am
Location: Rietberg/Germany

Re: Geany

Thu Dec 28, 2017 4:57 pm

Thank you, I will try that.

Just one more question - how can one write a GUI ( similar to tkinter) in C?
I would like - among other things - to create an elegant User interface and present data + alarms in a text box.

User avatar
Paeryn
Posts: 2952
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Geany

Thu Dec 28, 2017 6:11 pm

bonzadog wrote:
Thu Dec 28, 2017 4:57 pm
Just one more question - how can one write a GUI ( similar to tkinter) in C?
I would like - among other things - to create an elegant User interface and present data + alarms in a text box.
Well Tkinter is a Python wrapper for Tcl/Tk, you can easily link the Tcl/Tk interpreter library into a C program and use it (though Tkinter does hide the fact that Tcl/Tk is a language in its own right rather than just a library of functions).

GTK+ is a common GUI library, as is Qt (although I think Qt is C++ rather than C).
She who travels light — forgot something.

User avatar
PeterO
Posts: 5829
Joined: Sun Jul 22, 2012 4:14 pm

Re: Geany

Thu Dec 28, 2017 6:23 pm

bonzadog wrote:
Thu Dec 28, 2017 4:57 pm
Thank you, I will try that.

Just one more question - how can one write a GUI ( similar to tkinter) in C?
I would like - among other things - to create an elegant User interface and present data + alarms in a text box.
There are some GTK+3 examples on my web site at http://www.peteronion.org.uk/GtkExample ... rials.html

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
MikeG58
Posts: 32
Joined: Thu Jan 05, 2017 7:09 am

Re: Geany

Sat Jan 06, 2018 2:24 am

Along the lines of using Geany to play with GTK3. I'm having an awful time with that.

I think I have gtk-3.0 installed correctly.

Right now, I entered a small C program that has:

#include <gtk/gtk.h>

When I try to build my program, the compiler sends an error message that gtk/gtk.h can't be found. So, I to the "Set Build Command" option, and, from what I've poured over for gcc command options, have included the -I/usr/include/gtk-3.0 in both my Compile and my Build Command Window.

Now, I'm getting an error, complaining about /usr/include/gtk-3.0/gdk/gdkconfig.h:13:18 which must be referring to header glib.h, which doesn't exist.

I guess my question is, how do you set up the Build and Compile command to program with gtk?

-Mike

Silverlock
Posts: 87
Joined: Wed Apr 10, 2013 3:51 am

Re: Geany

Sat Jan 06, 2018 2:39 am

Possibly dumb question: do you have libglib2.0-dev installed?

Code: Select all

sudo apt-get install libglib2.0-dev
RPi3+external HDD/Raspbian Stretch

User avatar
MikeG58
Posts: 32
Joined: Thu Jan 05, 2017 7:09 am

Re: Geany

Sat Jan 06, 2018 4:07 am

No, hardly a dumb question at all!

Whoever posted a link to Peter Onion's tutorial, I'll have to go back and look, is a lifesaver.

Oh! It was Peter O. who posted it. Thank you Peter, and thanks for finally getting my feet on the ground! I don't know if I'll install Glade, can you ever have enough tools to program GTK! Just when you think you have everything you need, darn, you need to install something else, and, I'm not to good at the Linux packaging system yet, if that's what you call the system to install programs on Linux.

I don't know if I have libglib2.0-dev installed, but one of the first thing, the first thing in the tutorial was to add:

sudo apt-get install libgtk-3-dev, for GTK 3.0

However, I believe it was already installed, because it didn't download any packages, I don't think, from what little I understand about the Linux package system. Anyway, instead of getting 20+ lines, I only got 8 or less, so, I assume, that libgtk-3-dev had already been installed.

What I didn't know, was the very, very, long command line that you have to give to the gcc compiler, or you can use

$(pkg-config gtk+-3.0 --cflags --libs)

I still don't know exactly what I'm doing. I haven't yet got the first example GTK program to run on Geany, but, I did get it to run with the gcc command line:

gcc -Wall -Wextra -o GTKexample002 GTKexample002.c $(pkg-config gtk+-3.0 --cflags --libs)

Actually, it didn't run with this, but it did compile. And then I run it with ./GTKexample002

It worked! Finally!!!!!

Now, to see if I can get it to work with Geany.

:D I got it to work with Geany!

I'm getting a error message in my terminal window, but, I'll ask Peter O about this in my next post.

-Mike

Return to “C/C++”