LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-31-2012, 07:25 PM   #1
batfastad
Member
 
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95

Rep: Reputation: 23
Question Learning C/C++ under Fedora, lightweight IDE?


Hi everyone

I'm looking for a lightweight IDE to start learning C under Linux, specifically Fedora.

I have no experience in C however as a pro PHP developer the syntax looks vaguely recogniseable. I learnt Object Pascal back in the 90s but it's about time I went back to a proper programming language. My ultimate goal is to develop a custom module for the ProFTPD FTP server. I've been reading the developer docs for ProFTPD modules over the past month and it seems like an achievable goal. I've got it pretty much written in pseudo-code so now I just need to learn the guts! I've got code and syntax tutorials all sorted to start working through some simple projects.

I realise I could use a text editor for this but since I'm starting out I'd prefer an IDE which has some degree of syntax checking as I go along.
Eclipse seems a popular choice but appears to be a bit of a beast.
How about Code::Blocks or KDevelop?

Just wondered what tools people would recommend installing so I can get started?

EDIT: I should specify that initially I will only be looking to write console programs, no GUI stuff or frameworks yet.

Cheers, B

Last edited by batfastad; 03-31-2012 at 07:50 PM.
 
Old 04-01-2012, 05:04 AM   #2
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
Eclipse is certainly a beast...

If you are using a Gnome desktop then maybe you should look at Anjuta.
 
Old 04-02-2012, 01:19 AM   #3
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,767
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
I have taught C/C++ at the University level -- in the "naughties" -- and we used the compiler, debugger and emacs. Within emacs, we had various e-lisp files for syntax highlighting, interaction with the compiler and debugger and shell.

It doesn't get more light weight (grin) and old school than that.

Good Luck,
~~~ 0;-Dan

__________
"naughties" -- Many folks use the term "nought" or "naught" to mean zero. Dates from 2000 through 2009 have a leading zero or "nought." In contrast with the "nineties" or "eighties" or "teens".
 
Old 04-02-2012, 03:47 PM   #4
batfastad
Member
 
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95

Original Poster
Rep: Reputation: 23
Actually running LXDE at the moment as I didn't realise there would be window manager specific IDEs.
I'm planning on doing most of my practicing in a Fedora VM under VirtualBox.
So would it be better to use Gnome and a wider choice of IDEs, or a lightweight window manager and a smaller range of IDE options?

Or should I switch to a more lightweight distro?
I'd prefer to just install all the stuff through a package manager rather than compiling a bunch of stuff from source.
 
Old 04-02-2012, 05:15 PM   #5
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,767
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
If you are in the Debian or *-buntu or Mint family of distros, check out the build-essentials package.

A quick search turned up Linux ... Development that might be helpful.
Also, Tutorials.

As I posted earlier, I have taught C++ at the university level. I'll help where I can. To that end I have some questions.

Are you able to program now? In which languages and environments?
If you are not programming now, C and C++ might be a large bite for an
initial sortie into programming. I've taught complete rookies C and C++
but there were a few challenges. (grin) There were challenges teaching
veteran programmers too.

The 'C' language is procedural: do this, then this, ... , etc.
The "++" of 'C++' is a play on the C-language expression: "C=C+1".
In other words, a little more that 'C'. There are two distince families of
"little more" (what cajuns call "lagnaippe") to worry about.
  • better and stronger data typing and information hiding
  • object oriented features
You can benefit a lot from C++ without getting too involved with "objects".
They bring a lot to the table but not without costs. Thinking objects is
a different approach. For example, you don't update the data file. Instead,
a data file is a persistent representation of some group of objects.
Each object has a method (function or sub-routine) that it uses to store or retrieve itself.

Have you thought about a simple project to use to learn with? I find that a small
personal project is very helpful and effective.

Best of luck,
~~~ 0;-Dan
 
Old 04-02-2012, 06:38 PM   #6
batfastad
Member
 
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95

Original Poster
Rep: Reputation: 23
Hi there

Thanks for the info.
Yep I'm currently a professional PHP/JS developer and MySQL DBA. So I'm aware of the difference between procedural and OO as they stand with PHP. Back in the 90s I dabbled in Object Pascal with Delphi on Windows, building very simple GUI stuff (wake on lan magic packets, simple text editors etc) and a bit of basic. As well as various other scripting languages (AutoIt, AutoHotKey).

I'm quite interested in C initially but I've read up briefly about how C and C++ are related. I've got some tutorials and ready to go.
My main reason for wanting to get stuck into C is that it's the fundamental language of both ProFTPD and Apache modules. And my first project is to try to knock together a custom module for ProFTPD. Gone through the ProFTPD developers guide and it seems like I should be able to do what I want. I just need to cobble together the guts of the program in C first.

The difficulty I've found is knowing what tools I need to get started in Linux, compilers etc. In Fedora/LXDE I've just installed Code::Blocks and I'm pretty much underway (apart from an incorrectly linked compiler but that's now sorted!).

Cheers, B
 
Old 04-02-2012, 09:10 PM   #7
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,767
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
You might like these two books:

http://www.amazon.com/GNU-Linux-Appl...3418328&sr=1-6

http://www.amazon.com/An-Introductio...d_bxgy_b_img_b

One man's suggestions:

Think of C++ as "a better C compiler". C gives you struct data type. Look at the collection of standard library routines fopen() fread() fwrite() fclose() and friends. Each of these uses a struct to glue things together. Any code written to
use them can tinker the contents of the struct however they want. C++ lets you declare data items as public or private or protected within the struct. Now the compiler will enforce access to data items. Go the next step and the struct becomes a class and is even smarter.

C will let you do all sorts of tricky tricks with integers and pointers and character data items. C++ will permit the same things, but the compiler will enforce doing them only if you write the code to permit them in advance. All of that compile-time enforcement of data hiding and loose coupling is a huge help to good module or component based designs.

I'm here if you have questions. PM if you need to get my attention.

I started writing C in the early 80's on really, true AT&T(R) Unix(TM). I started with C++ in 1992 (I have a signed, first edition, Stroustroup book. grin) There is much to object oriented in C++ that I have never used, but I've been paid for thousands of lines of code -- both workstation and embedded.

keep Us Posted,
~~~ 0;-Dan
 
  


Reply

Tags
ide


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
Fast lightweight PHP editor/IDE Chaves Slackware 7 12-25-2017 06:41 AM
LXer: My search findings on Learning C/C++ Programming and Using an IDE LXer Syndicated Linux News 0 03-20-2012 11:21 PM
Lightweight IDE for a netbook? anon02 Linux - Software 2 11-13-2011 09:16 AM
C++ IDE and C++ learning. nesrail Programming 4 01-29-2009 09:45 AM
Lightweight Development IDE (C++ specific, if possible) Ninwa Linux - Software 11 06-24-2004 07:01 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:11 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration