LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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-24-2005, 09:05 AM   #1
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Rep: Reputation: 30
C for total noob


dear all,

i'd like to start programming in C++ in linux.

currently i'm a programmer in various lanugages, however have practically no real familiarity with C.

can anyone point me in the best possible direction for a complete noob tutorial which would explain which programs to use, how to compile, etc a typical graphical hello world application in linux? i always fall on visual C or other tutorials, which always presume you know how to compile stuff, which programs to use,... (weird, isn't it, for a beginner tutorial...)

any suggestions welcomed,

cheers,

aj.
 
Old 03-24-2005, 09:09 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 65
I'm moving you to programming because I think this has more relevance there. Good luck.
 
Old 03-24-2005, 09:32 AM   #3
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 58
http://gtk.org/tutorial/

First of all though, you need to pick a language. Do you want to learn C or C++, because they are different.
 
Old 03-24-2005, 09:42 AM   #4
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
thank you itsme86.

i'm looking to program GUI applications which will basically read / write files, do some XML work and so.

i guess C++ is more recent (i guess more powerful..), that's why i wanted to try it.

what is GTK? is the same as GCC?
 
Old 03-24-2005, 09:46 AM   #5
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 65
GTK is a toolkit for GUI programming (used in things like The Gimp, The Gnome Desktop and Gaim). GCC is the Gnu Compiler Collection, which is what you use to compile your c, c++, and many other languages code under Linux.

C++ is really no more powerful then C. C++ simply provides extra constructs to make Object Oriented programming easier. That isn't to say you have to write object oriented code in C++, or that you can't in C. GTK is actually written natively in C though it has a very OO design.
 
Old 03-24-2005, 10:11 AM   #6
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 58
It's a set of libraries that you can link into your program. You can read about it on their homepage: http://gtk.org/

C++ isn't "more powerful" than C. It's a different design approach from C. It's what programmers call Object Oriented. Personally, I can't stand C++, but I love C. GTK is more for C, than C++. QT is like GTK, but for C++. You might want to look into that too.
 
Old 03-24-2005, 10:21 AM   #7
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
thank you for this support.

just to have a little more insight: i need to build an application which will have textboxes, labels, and a Tree View. that is pretty straightforward in development tools such as borland delphi, visual C and visual basic.

is the GTK able to handle things like treeviews? i just guess i am too narrow-minded to GUI programming by dragging components on a form, and cannot imagine how to do this in text-only mode...
 
Old 03-24-2005, 10:23 AM   #8
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
And if you're looking for an IDE I use KDevelop and quite enjoy it--beats editing sources in vi
 
Old 03-24-2005, 10:29 AM   #9
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 65
Yes, GTK will support all of those things. If you are looking for an IDE I suggest you check out Anjuta. Anjuta will do other things, but it is based on GTK/C programming.
 
Old 03-24-2005, 10:33 AM   #10
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
anjuta does look cool and familiar.

however:
1. isn't this too evolved for my 'noobity'?
2. i read it uses GTK and GLADE: do i need to install both? or only GT (which i already have installed)?

again, thank you,

aj.
 
Old 03-24-2005, 10:40 AM   #11
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 65
I would recommend you become familure with C before you jump directly into GTK gui programming.

I don't actually use Anjuta myself, so I'll leave that question for somebody who has a more educated answer.
 
Old 03-24-2005, 05:45 PM   #12
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
thank you all,

i've downloaded and installed anjuta and glade (i already had gtk installed).

doing my first proggies... not sure if i took the easy way, i installed an XML parser for gnome and am trying to printout XML results in a treeview

cheers 2 you all,

aj.
 
  


Reply


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
help im a total noob darkx Suse/Novell 2 11-20-2005 06:13 AM
Total Noob nomass Linux - Newbie 8 05-12-2005 11:54 PM
Total Noob icadeal Linux - Distributions 7 04-13-2005 08:46 PM
Total noob ini_Silent Linux - Newbie 9 12-14-2003 10:07 PM
I am a TOTAL noob. Norrin Linux - Newbie 17 08-14-2003 02:26 PM


All times are GMT -5. The time now is 10:40 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration