Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 30 Oct 2014, 19:11
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
C/C++ Development in Puppy Linux
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 6 Posts_count   Goto page: 1, 2, 3, 4, 5, 6 Next
Author Message
Wosh


Joined: 09 Jul 2007
Posts: 60
Location: Nuremberg Germany

PostPosted: Fri 02 May 2008, 02:31    Post_subject:  C/C++ Development in Puppy Linux
Sub_title: Which IDE can be used? Has anybody compiled an IDE for Puppy?
 

Hi folks

I would would like to do some C/C++ Development in Puppy-Linux integrating Glade/Gtk+, but I haven't found an IDE running smoothly with Puppy Linux.

My search within the web leads to Anjuta. But it seems to need the Gnome libraries. Has any body tried to make it run?

Or should we try to make this or another IDE run for Puppy Linux within this thread together?

Please report your experiences.

_________________
Wosh

Edited_time_total
Back to top
View user's profile Send_private_message 
tronkel


Joined: 30 Sep 2005
Posts: 1101
Location: Vienna Austria

PostPosted: Fri 02 May 2008, 02:48    Post_subject:  

You should have a look at C++ programming using FLTK.

It includes a GUI builder called Fluid and operates seamlessly with c/c++ and the STL libraries. It is small and fast as well. Ideal for use in Puppy.

I once made a dotpet of this.

http://www.dotpups.de/dotpups/Programming/

You'll certainly need some help to get started, but it's not difficult at all.

Google for "ercol" and see what comes up. That guy did a great series of demos for FLTK that I found invaluable.

_________________
Life is too short to spend it in front of a computer
Back to top
View user's profile Send_private_message Visit_website AIM 
ARAN

Joined: 21 Oct 2005
Posts: 113

PostPosted: Fri 02 May 2008, 07:41    Post_subject: Compiling Anjuta from sources  

A very easy HOWTO for compiling ANJUTA from sources can you find here !

http://groups.google.com/group/anjuta/web/building-anjuta-from-sources-on-ubuntu
Back to top
View user's profile Send_private_message 
Wosh


Joined: 09 Jul 2007
Posts: 60
Location: Nuremberg Germany

PostPosted: Sat 03 May 2008, 03:51    Post_subject:  Gtk+ Applications written in C/C++
Sub_title: Am I the first Puppy User walking this way?
 

Hi tronkel

ercol leads to a furniture manufacturer

Hi ARAN

thanks for your hints for Anjuta, if noone other has come further yet I will try to compile Anjuta from the scratch.

But I want to explain a little bit better what I want to do and why I want it to do:

From my experience there is no easy way to write Gtk+ applications in Puppy Linux.
The alternatives are:

1. Shell scripts using gtkdialog (for me very cryptic hard to understand, forced to use cryptic tools like sed, awk to manipulate texts, very limited in variable handling).

2. Puppy Basic (easy to understand, but rather limited for complex jobs).

3. TCL/TK (no experience on my part).

So even that guys like Sigbert do great jobs using these languages, they are all interpreters which will fail if it comes to complex or time critical demands.

So what I want to do:
I have downloaded the Puppy-Linux-3.99 Development Version integrating Glade, which enables a very easy way to build Gtk+ user interfaces. But the coding of the callback functions has been removed from new versions of Glade.

What I have found out, is that IDEs like Anjuta seem to have an Integration of Glade and the supporting libraries like libglade or Gtkmm. Am I right?
What do I have to do to code Gtk+ Applications in C/C++ integrating tools like Glade?
Is anybody further than me?

_________________
Wosh
Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7060
Location: Perth, Western Australia

PostPosted: Sat 03 May 2008, 09:35    Post_subject:  

Have a look at the menu in Puppy "Menu -> Help -> Howto program for Puppy".

One interesting possibility is to use Glade with FreeBASIC. There is a tool that will generate a skeleton FreeBASIC program to use a particular Glade file. This is in Puppy4, I don't recall if I put this info and tool in Puppy3.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
muggins

Joined: 20 Jan 2006
Posts: 6689
Location: lisbon

PostPosted: Sat 03 May 2008, 09:57    Post_subject:  

Quote:
ercol leads to a furniture manufacturer


I think this is what Tronkel was referring to:

http://seriss.com/people/erco/fltk/
Back to top
View user's profile Send_private_message 
Wosh


Joined: 09 Jul 2007
Posts: 60
Location: Nuremberg Germany

PostPosted: Mon 05 May 2008, 05:43    Post_subject:  Plea for offering a C/C++ programming option in Puppy Linux
Sub_title: Hello world, am I alone?
 

Hi muggins, hi tronkel
I have taken a closer look to Fltk/Fluid on http://seriss.com/people/erco/fltk/

Fluid is a GUI-Builder like Glade with the advantage to generate C-Code from the selected widgets.
Fltk is a platform-independant windows-library, but I am not shure whether it has been ported to Gtk+. Has someone more knowhow about that?
The video-tutorials on this page are excellent. So Fltk/Fluid could be a choice if it is possible to create Gtk+ applications, but they still require an IDE.

Hi BarryK
I already had read Menu/Help/How to program for Puppy but the but the choices offered there did not satisfy me enough. So as a professional software developer I am hoping that more Puppy developers want to create applications that are beyond the scope of these options fitting for simple applications but not for complex and optimized solutions.

Hi all
Maybe I still have not made clear what I am thinking about. So here is:

My plea for offering a C/C++ programming option in Puppy Linux

In my opinion the programming options to create Gtk+ programs in Puppy Linux are mediocre. Let explain my point of view:

1. Gtkdialog within a shell script
Even if gtkdialog has it's right for small applications like Pprocess it's limit is overstepped in applications like Pburn.
If you bother about taking a look into these scripts, you will see which mental acrobatics is necessary to get results:

a) Function results are stored in temporary files.
b) There is no simple way to create typed variables.
c) Lists are not supported.
d) The use of function parameters is limited.
e) Text manipulation is ineffective, hard to understand and only possible with the use of cryptic tools like sed, awk and cut.
f) The language itself is hard to understand. For me the only reason for it's existence is that very conservative point of view: "It has been in all Unix-Derivatives and so it must stay in all Unix-Derivatives until the Day of Judgment". It is a fossil that can be used for what it was developed: "The combination of skilled unix tools in a script".
g) Due to all these limits the performance of such a program must be lousy and can only be tolerated for applications where time doesn't play a role.
h) For those people that want to do even more chin-ups there is a good guide about shell scripts in:
http://tldp.org/LDP/abs/html/

What does it mean to use this language for complex applications:
I have to spend a lot of time to learn this language, I have to go into contortions to go around all it's traps. So a lot of my development time will be spent to find solutions for this language instead of the problem I am thinking about. It reminds me a little bit of the Stone Age of programming, when there
used to be guys that were able to read the machine code within the binaries laughing about people needing an Assembler to understand what is meant.

My result is:
To use the shell-script-language for complex applications, is same as to use a toothbrush for painting a wall. You will get interesting results that will be admired by a lover of this kind of art, but for the most purposes it is a waste of time.

So I on the one hand admire guys like Sigbert undertaking the punishment to create applications like Pburn as a gtkdialog-shell-script. On the other hand I think: "What a waste of time and talent. What could this guy reach with a reasonable Programming Language?"

What are the alternatives:

2. TCL/TK
TCL/TK is an interpreter to with all it's performance disadvantages

3. Puppybasic
Except of being an interpreter to puppybasic which is simple to understand only can be used for simple solutions.

4. Freebasic
Even if the programs created may be compiled and the guys developing the language may have solutions for complex purposes, it is still Basic and won't reach the possibilities of a C-Program

5. C/C++
I have programmed for about 20 years in different programming languages reaching from several kinds of assembler up to SQL but my favorite is still C/C++.

Why? If you are not accustomed to it C may be is cryptic as shell scripts are for me. Pascal is a lot nicer and leads to similar results. But C enables me to create solutions ranging from close to assembler up to GUI with a minimum of key typing effort.
So C for me is the English of Programming, universal in its purpose, rather easy to understand and quite fast to code. And it is no accident that even about 90% of the programs in Linux have been coded in C/C++.

What really makes me wonder is that a seem to be the only one seeing the need to a C/C++ IDE in Puppy Linux. So I especially ask the Puppy Linux developers:

How do you want to create a small and effective Linux distribution, if you avoid using the tools that enable you to create such kind of programs?
Has the C-development package sunk so low that it is used only to compile third part applications?
Who else sees the need to have a good C/C++ IDE in Puppy Linux?

_________________
Wosh
Back to top
View user's profile Send_private_message 
muggins

Joined: 20 Jan 2006
Posts: 6689
Location: lisbon

PostPosted: Mon 05 May 2008, 07:06    Post_subject:  

Quote:
Who else sees the need to have a good C/C++ IDE in Puppy Linux?


Hello Wosh,

which are the good c/c++ IDE's? Anjuta has gnome dependencies. How minimal these are I'm not sure. I had a look at Crow Designer, but couldn't get it to compile on the latest puppy due to a glib incompatibility!

You might want to check this out:

http://enveria.sourceforge.net/

They have quite a nice gtk tutorial available as a .pdf download. And the Ide compiles easily, although I don't know how stable it is.

Regarding Fltk, it's a different graphics toolkit to gtk+. I'm not sure whether a gtk wrapper is available for it or not.

If you like programming in c/c++ then gtk isn't your only graphics option. You've also got QT, fltk & wx toolkits. For the latter you can look at codeblocks or CodeLite.

The problem with CodeLite & CodeBlocks are they require the bulky wx-widgets. Likewise anjuta needs gnome-libs, and any qt-based IDE is going to require QT libs, (probably the bloated QT4).

Regarding Tcl/Tk as a graphics toolkit, while it's definitely interpreted, you can also interface it with c/c++, so that you can write any time critical parts, like loops & array processing, in c/c++. I keep meaning to get stuck into it myself!

Lastly, you might be interested in checking out JohnMurga's MurgaLua. While it's also based on an interpeted language, (Lua), it has bindings to the fltk toolkit, and it's also easy to interface lua with c/c++.


(I forgot to mention ultimate++)
Back to top
View user's profile Send_private_message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Mon 05 May 2008, 07:54    Post_subject:  

from the Glade readme:
Quote:
About Glade-3
~~~~~~~~~~~~~

This version of Glade (Glade-3) is a complete rewrite of the original Glade codebase.

One of the main differnces from glade-2 is that C code generation has been removed from
glade-3: this has been done on purpose, since using generated code is deprecated; the preferred
way to use glade files is with libglade (if code generation is needed, this can be provided
as another tool or plugin, code generation is simply not a part of the glade-3 project).


http://glade.gnome.org/

Libglade:
http://www.jamesh.id.au/software/libglade/

I found no link for a tool, that can convert Glade 3 XML-files to C.
So you had to install Glade 2, if you need that, and also cannot find a tool.
Or look in the examples/docs of Glade, how libglade is used.

I use libglade in GtkBasic, but this will not help you.
But maybe I can explain the basic concept.
It works like this:
Whenever an event occurs, it is connected to the function "signal_handler".

Here is the relevant code from the Interpreter:

Code:

 void connections(GladeXML *xml){
   /*connect all widgets event*/
   GList* allwidgets=NULL;
   GtkWidget *widget;
   
   allwidgets = glade_xml_get_widget_prefix(xml, "");
   
   while (allwidgets != NULL) {
      g_signal_connect (G_OBJECT (allwidgets->data), "event", G_CALLBACK (signal_handler), NULL);
      allwidgets = allwidgets->next;
   }
   
   g_list_free(allwidgets);

}


int loadXMLFile(char *file){
   //printf("---%s\n" , file);
   removeNL(file);
   //gdk_threads_enter();
   /* load the interface */
   xml = glade_xml_new(file, NULL, NULL);
   //gdk_threads_leave();
   if (xml==NULL) return -1;
   connections(xml);
   return 0;
}


I took this code from "gins", it is short, and very helpfull to see, how libglade can be used.
http://freeweb.lombardiacom.it/kirsoft/gins.html

Here are some lines from the function "signal_handler":
Code:
//-- Main Event-handler --
gboolean signal_handler(GtkWidget *widget, GdkEvent* event, gpointer data) {

}


I just show it, so that you can see, what parameters it uses.
The part in the function will not help you, as in GtkBasic this is very specific using an own datatype "variant" (inherited from wxBasic).
So I don't post it here.
But you can see, that this function receives all you need, to write conditions, that do specific things on certain widgets or events.

The gins sourcecode will be more interesting for you.

I write GtkBasic using leafpad, and compile it with a simple makefile that just runs gcc , so I cannot recommend an IDE.
Mark

_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Mon 05 May 2008, 08:12    Post_subject:  

here are some examples:
http://www.gnome.org/~newren/tutorials/developing-with-gnome/html/apc.html

http://www.gnome.org/~newren/tutorials/developing-with-gnome/html/

Mark

_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Mon 05 May 2008, 09:57    Post_subject:  

Glade-2 for Puppy:
http://murga-linux.com/puppy/viewtopic.php?p=194885#194885
Mark

_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
Wosh


Joined: 09 Jul 2007
Posts: 60
Location: Nuremberg Germany

PostPosted: Mon 05 May 2008, 11:44    Post_subject:  Gtk+ C/C++ Package
Sub_title: Will it be possible to create an IDE package for efficent C/C++ programming?
 

Hi muggins
Thanks for your reply. Your hints about the IDEs are very useful. Did you try to compile Enveria for Puppy Linux?

Hi MU
Thanks for your links. Especially
http://www.gnome.org/~newren/tutorials/developing-with-gnome/html/
offers a lot of useful information.
Glade-2 does not seem to be a serious alternative to Glade-3 because it seems not to be supported any more. Maybe it can be used as an generator for callback functions for libglade. I will see. I am wondering a little bit why the automatic code generation was removed from Glade without supplying a better alternative (now the code generation must be done manually).

Hi folks

Gtk+ C/C++ Package

It seems that up to now no one has coded Gtk+ C/C++ programs in Puppy Linux due to the lack of appropriate tools.

So my target is to create a PET-package or an sfs-file (if it becomes to extensive) containing all the tools and information necessary for easy Gtk+ C/C++ programing.

It seems, there doesn't exist an IDE for Puppy because the default Linux-IDEs need libraries that are not part of the Puppy-Linux distribution. We have:

Anjuta (gnome dependencies, Glade integration)
Crow Designer (not supported any more)
Codeblocks (wxWidget dependencies)
CodeLite (wxWidget dependencies)
Enveria (RAD-IDE especially for Gtk+)

From these alternatives especially Enveria with it's Gtk+ integration and Anjuta with it's Glade integration are very promising.

Does anybody know whether it will be possible to compile and run Anjuta without the installation of gnome?
Is there anybody out there who has an IDE working with Puppy Linux?

_________________
Wosh
Back to top
View user's profile Send_private_message 
SirDuncan


Joined: 09 Dec 2006
Posts: 836
Location: Ohio, USA

PostPosted: Mon 05 May 2008, 12:52    Post_subject:  

I did have Anjuta almost working at one point, but I kept getting some error that did not seem to have anything to do with dependencies (I think it may have been something about locale not supported). I didn't really have the motivation to figure it out. I think I still have all the libs archived somewhere, so I will post them once I have found them. Maybe you will be able to get it working.

I would probably have worked harder on getting it working, but I have no pressing need to write GUIs since all of the assignments for class are still CLI.

EDIT: Found them. At least I think this is all of them. I actually had more than one folder named anjuta, but I think this is from the one that was close to working. I temporarily hosted them on my university webspace, but it's not really intended for file hosting so I won't leave them there for long.
SECOND EDIT: Mark has mirrored the files, so I have removed them from my webspace. They can now be found at:
http://dotpups.de/puppy3/dotpups/Programming/Anjuta-2.3.1/

_________________
Be brave that God may help thee, speak the truth even if it leads to death, and safeguard the helpless. - A knight's oath

Edited_times_total
Back to top
View user's profile Send_private_message Visit_website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Mon 05 May 2008, 17:01    Post_subject:  

SirDuncan
I can mirror the files.
In which Puppy version did you create them?
Mark

_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
SirDuncan


Joined: 09 Dec 2006
Posts: 836
Location: Ohio, USA

PostPosted: Mon 05 May 2008, 18:19    Post_subject:  

I think it was in 3.01, because I remember using Slackware binaries for some of the packages.
_________________
Be brave that God may help thee, speak the truth even if it leads to death, and safeguard the helpless. - A knight's oath
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 6 Posts_count   Goto page: 1, 2, 3, 4, 5, 6 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1126s ][ Queries: 12 (0.0049s) ][ GZIP on ]