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 Sun 19 May 2013, 00:45
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
What's needed in PL 511 --> 528 to program in C lang?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [26 Posts]   Goto page: 1, 2 Next
Author Message
benny7440


Joined: 20 Apr 2009
Posts: 305

PostPosted: Sat 31 Dec 2011, 18:25    Post subject:  What's needed in PL 511 --> 528 to program in C lang?
Subject description: What's the overall most recommended package in general?
 

I've been thinking for a long time to do some basic-general programming but never got to choose a language. I think I made my decision for this coming year: C it'll be!

I'll need some refreshing sites/tutorials/examples, I'm confident that I won't have any problem with the above but, I must make my decision as to what I'm going to use, that's all done.

I'm pretty sure that I'll do it from a Puppy. FOA, I don't have Windows (any). I don't know what use might have for me, but I've been looking at a "Visual C++ 6" book sitting near by but have not opened it, yet. Maybe next year.

I wish you all a much better 2012 & thanks for your work in the forum (both, simple users making questions & moderators & maintainers/developers)!
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3012
Location: Oregon

PostPosted: Sat 31 Dec 2011, 20:21    Post subject:  

First and foremost, you need to have devx for the version of Puppy you are running loaded. It contains the compilers and supporting library files needed for compiling programs.
Normally one uses Geany, the text editor to write the C programs and it can be set up to compile and run a program without ever leaving it.
If you are going to try your hand at compiling any drivers for Puppy you also need the kernel source file for compatability reasons.

I had did very little in C programming and have restricted myself to writing program scripts for use with gtkdialog. You would be surprised what you can accomplish with it.
As an example, PBurn in Puppy is a collection of gtkdialog scripts and it looks very professional.

My main offering to the Puppy world was a graphical front end to a utility that would format a USB floppy disk and make it dos compatable.

A lot of programs in Puppy are gtkdialog scripts and examining them gives you insight into what can be done and how it was done.

There are a lot of C tutorials on the web so I am not going to go there.
Back to top
View user's profile Send private message 
benny7440


Joined: 20 Apr 2009
Posts: 305

PostPosted: Sat 31 Dec 2011, 20:35    Post subject:  

Thanks, 8-bit, for responding!

I'll check that later on, after returning from the gas station.
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15109
Location: Paradox Realm

PostPosted: Sat 31 Dec 2011, 23:37    Post subject:  

See appendix 1-4
http://puppylinux.org/wikka/Compiling

Example of available tutorial
http://www.cprogramming.com/tutorial.html

Good luck

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
benny7440


Joined: 20 Apr 2009
Posts: 305

PostPosted: Sun 01 Jan 2012, 00:05    Post subject:  

Thanks for responding Lobster!

I'm downloading right now the devx file but it's too late here now at 12:01 am (amidst a sample of the Gulf War "scenario"). Too tire for continuing with this. Installing & using this isn't an everyday thing for me.

I'll post below, later with the outcome of it...
Back to top
View user's profile Send private message 
benny7440


Joined: 20 Apr 2009
Posts: 305

PostPosted: Mon 02 Jan 2012, 11:21    Post subject:  

I checked the md5 sum & it was ok. I also decided to move the sfs file to the 511 folder, instead.

Now, I'm afraid it'll bring difficulties for having moved it to a previous puppy version: am I right on this?

I have not done anything with it except to do as the instructions read said: go to Menu > System > BootManager for "enabling" that sfs file to be loaded at boot time but received a message that suggested it was the wrong version/code-signature or something like that. I also increased the personal storage size (thank God I didn't used all available space on the partition --in case I need to move the sfs file back to where it's supposed to be, originally).

As far as you (I mean, any of you) know, is it advisable at this point to move the sfs file back to the 528 folder before trying to use the package?

Thanks!

PS. I've various puppies in here: 511, 525 & 528; also Wary 512 (if I'm not wrong) & Puppy Studio. At first I thought that it was better to use the latest puppy with this, but now I'm not so sure. Do you agree that 528 it should be? For this puppy was the d/l sfs file chosen.

Edition: In the examples I've read so far I should unpack & install something, with respect to this .SFS file I think there's no readme file within it nor any installations to be made: am I right? I just have to move it to the right place & tell the Boot Manager to load it at bootup: correct?
Back to top
View user's profile Send private message 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2298
Location: USA

PostPosted: Mon 02 Jan 2012, 18:01    Post subject:  

benny7440 wrote:
I checked the md5 sum & it was ok. I also decided to move the sfs file to the 511 folder, instead.

Now, I'm afraid it'll bring difficulties for having moved it to a previous puppy version: am I right on this?

I have not done anything with it except to do as the instructions read said: go to Menu > System > BootManager for "enabling" that sfs file to be loaded at boot time but received a message that suggested it was the wrong version/code-signature or something like that. I also increased the personal storage size (thank God I didn't used all available space on the partition --in case I need to move the sfs file back to where it's supposed to be, originally).

As far as you (I mean, any of you) know, is it advisable at this point to move the sfs file back to the 528 folder before trying to use the package?

Thanks!

PS. I've various puppies in here: 511, 525 & 528; also Wary 512 (if I'm not wrong) & Puppy Studio. At first I thought that it was better to use the latest puppy with this, but now I'm not so sure. Do you agree that 528 it should be? For this puppy was the d/l sfs file chosen.

Edition: In the examples I've read so far I should unpack & install something, with respect to this .SFS file I think there's no readme file within it nor any installations to be made: am I right? I just have to move it to the right place & tell the Boot Manager to load it at bootup: correct?


I'm not sure, but I think each DEVX is linked to a specific version of Puppy:

http://distro.ibiblio.org/pub/linux/distributions/puppylinux/
http://distro.ibiblio.org/pub/linux/distributions/quirky/

Put your DEVX the same folder that your main .sfs file is (e.g. "lupu_528.sfs") -- at least in the 5.x series -- some older versions require that it be in /mnt/home/ -- and it will not be found in a sub folder, e.g.: /mnt/home/puppy412/.

For example, all of my stuff sits in /mnt/home/puppy528/ (save files, main .sfs, add on packages, etc)

Tell your puppy to load with the Boot Manager, and then REBOOT (so it loads). Then test it. No "unpacking" is required -- self contained package.

_________________
Wellminded Search
Add swapfile
Back to top
View user's profile Send private message 
benny7440


Joined: 20 Apr 2009
Posts: 305

PostPosted: Mon 02 Jan 2012, 18:34    Post subject:  

Thanks for responding, RetroTechGuy!

All the previous posts were made from 511 but now I'm running 528 with the devx pack. moved back to it prior to rebooting. Cannot test it rightaway but maybe late at night might have a chance or tomorrow.

Went to a Tutorial page but didn't find a suitable ex. for testing: "Hello world!". Have to try harder.

Also, it confused me a little to read there about the gcc libraries. I made a search for 'gcc' from 528 & it appeared that I'm able to do something with the included libs but don't know it yet.
Back to top
View user's profile Send private message 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2298
Location: USA

PostPosted: Mon 02 Jan 2012, 23:34    Post subject:  

benny7440 wrote:
Thanks for responding, RetroTechGuy!

All the previous posts were made from 511 but now I'm running 528 with the devx pack. moved back to it prior to rebooting. Cannot test it rightaway but maybe late at night might have a chance or tomorrow.

Went to a Tutorial page but didn't find a suitable ex. for testing: "Hello world!". Have to try harder.

Also, it confused me a little to read there about the gcc libraries. I made a search for 'gcc' from 528 & it appeared that I'm able to do something with the included libs but don't know it yet.


I don't write in C (I actually never got around to learning it). I primarily work in Fortran when I program (usually data analysis purposes). I do some simple scripting and batch files, but I generally find those tedious....

There is a Fortran compiler .pet floating around (you need to get the right one, or it doesn't work under Lupu 5.x series).

_________________
Wellminded Search
Add swapfile
Back to top
View user's profile Send private message 
benny7440


Joined: 20 Apr 2009
Posts: 305

PostPosted: Tue 03 Jan 2012, 11:55    Post subject:  

As probably said above, I moved the sfs file to the 528 folder where it's located the personal storage file, also the little script "Hello World!" is located there. Now what?

Don't know how to compile it. I'm trying the ROXTerm as my terminal console for the Ist time. Used NicoEdit to write the script (with the C language preference chosen).

Have read some tutorials (overview) for C programming/compiling but the info isn't enough.

Also, within that console, wrote gcc to see what happenned but the outcome is: "command not found", the same with devx or devx_528-4. I even can't find a way to change the directory. Don't find/know the login id nor pwd for this puppy, in case this's what's needed to permit me to do something.

Any tips?

Edit: Is there a manual/help for the devx compiler?
Back to top
View user's profile Send private message 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2298
Location: USA

PostPosted: Tue 03 Jan 2012, 14:36    Post subject:  

benny7440 wrote:
As probably said above, I moved the sfs file to the 528 folder where it's located the personal storage file, also the little script "Hello World!" is located there. Now what?

Don't know how to compile it. I'm trying the ROXTerm as my terminal console for the Ist time. Used NicoEdit to write the script (with the C language preference chosen).

Have read some tutorials (overview) for C programming/compiling but the info isn't enough.

Also, within that console, wrote gcc to see what happenned but the outcome is: "command not found", the same with devx or devx_528-4. I even can't find a way to change the directory. Don't find/know the login id nor pwd for this puppy, in case this's what's needed to permit me to do something.

Any tips?

Edit: Is there a manual/help for the devx compiler?


The "devx" just contains developer tools (e.g. "cc" or "gcc"). It becomes part of your filesystem, when mounted.

Similarly, the lupu_528.sfs is the core part of the OS -- and your save file becomes your customization of the system.

Many "users" don't need development tools, so they are left out of the basic package, to keep the size down.

OK, I just opened my terminal on 5.28, and both "cc" and "gcc" report "no input files" (since I didn't specify a name to compile).

You did tell your 5.28 session to mount the lupu_devx_528-4.sfs? And you did reboot before trying the commands?

_________________
Wellminded Search
Add swapfile
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 3843

PostPosted: Wed 04 Jan 2012, 17:38    Post subject:  

first, check out pet packaging 101 (see my signature)

the best resource I have found is:
http://www.cs.cf.ac.uk/Dave/C/

if you are wanting to write GUI programs in C, I recently posted glade and glade-2 (the ones that write the actual C)
http://www.murga-linux.com/puppy/viewtopic.php?t=74882

if you get stuck - google the command(s) with its required include file(s) like #include <stdio.h> or whatever (to filter out garbage)

_________________
Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
benny7440


Joined: 20 Apr 2009
Posts: 305

PostPosted: Thu 05 Jan 2012, 10:35    Post subject:  

Thanks, RetroTechGuy, for responding!

I don't remember having read that I had to mount the file prior to rebooting the machine: I did left-click the SFS file right now (I also closed the window that opened when it was mounted after trying to find a readme file somewhere: didn't find any). Now, I'm about to re-read your post & the next one &, then, I'm rebooting. After that I'm going to perform that gcc & cc checks. After that, if the system responds as I need I'll post it, if it doesn't I'll remount the SFS file, leave that window opened & reboot; after this I'll repeat the tests & post here below.

Thanks technosaurus for your links & advise!

I'll check the links provided as well as your signature-embedded info after trying the previous poster' tips &, if there I find issues I will post any question below.
Back to top
View user's profile Send private message 
benny7440


Joined: 20 Apr 2009
Posts: 305

PostPosted: Thu 05 Jan 2012, 12:03    Post subject:  

After remounting the SFS file & not closing the corresponding window & rebooting I opened a terminal & typed gcc, cc & devx & all gave me the corresponding "command not found" message. Then, I went to the Menu to see if there was an entry for the package & found something in: Menu > Setup > Setup Puupy (SFS - Load on-the-fly). I clicked on that & a window opened (SFS-Load). There, I selected the devx package & a new selection window appeared with the following for choosing:
1) Glade Interface Designer
2) Python (v2.6)
3) Sysprof Profiler
4) Valide

Now I don't know what to choose, if any. I've opened a terminal & both, gcc & cc gave me a "no input file" message (good, I think). When tried the devx a "command not found" message was given (is it good or bad?).

I'll post this & will leave that selection window opened for a while awaiting instructions as to what to do next.

Thanks!
Back to top
View user's profile Send private message 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2298
Location: USA

PostPosted: Thu 05 Jan 2012, 12:33    Post subject:  

benny7440 wrote:
Now I don't know what to choose, if any. I've opened a terminal & both, gcc & cc gave me a "no input file" message (good, I think).


Sounds like it's working. Now you just need some C code to test it on...

Quote:
When tried the devx a "command not found" message was given (is it good or bad?).


Ermm...??? I don't know what you tried....

Think of the devx as a toolbox. You "opened it" (by mounting it). Now the contents of that toolbox are available to you. Don't over-complicate it!... Smile

_________________
Wellminded Search
Add swapfile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [26 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0937s ][ Queries: 11 (0.0159s) ][ GZIP on ]