LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-26-2015, 07:18 AM   #1
killertux
Member
 
Registered: May 2015
Location: India
Distribution: Ubuntu 14.04 LTS
Posts: 49

Rep: Reputation: Disabled
Which one's better ?


Hello Everyone !
This year I have to Learn C++ in school.But my uncle said it would be better to learn C first.So I am learning C in the summer holidays.But I do not know of any good C/C++ IDEs or at least which one will suit me.
There are a lot of IDEs like Netbeans,Codeblocks,Anjuta,Eclipse etc.But I do not know which one is better and which one I should use.
so please guys help me choose one.I would prefer the one or two which is easy to use and simple.
Thanks in advance !
 
Old 05-26-2015, 07:37 AM   #2
Hiesso
LQ Newbie
 
Registered: May 2015
Posts: 1

Rep: Reputation: Disabled
Hi Killertux,

I'm fairly new to programming (just started about a couple of years back), I've only used two IDEs for programming in C++: Visual Studio from Micro**** and Eclipse. I recommend Eclipse, its easy to use and there is a lot of support out there.
 
Old 05-26-2015, 07:41 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,203

Rep: Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675
You should use the one you know already. And also you may try to start without ide, with a simple editor and command line tools (like compiler, make) just to be familiar with those things
 
Old 05-26-2015, 10:51 AM   #4
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: AntiX.
Posts: 1,825

Rep: Reputation: Disabled
Lots of programmers just use a programmers editor such as vi(m). You can write your code & (test) run your program from within it just like a pro.
 
Old 05-26-2015, 11:12 AM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,459

Rep: Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053
Why do you need an IDE in the first place? If you want one, that's fine, but in that case you need to specify why you want one (What are you looking to get out of it? What features do you need?) so that recommendations can be tailored to that goal.
 
Old 05-26-2015, 11:29 AM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,612

Rep: Reputation: 1884Reputation: 1884Reputation: 1884Reputation: 1884Reputation: 1884Reputation: 1884Reputation: 1884Reputation: 1884Reputation: 1884Reputation: 1884Reputation: 1884
I have only learned the basics of programing but following on from the above I would say that learning to use a simple text editor and command-line compiling and linking tools is a good idea. You may become a developer and never have to use them. However, the language learned is independant of the IDE and I think the IDE can get in the way when learning. There's also the fact you may decide to develop for a platform on which using an IDE is problematic.
If any more experienced codes disagree though I'd take. Their word for it.
 
Old 05-26-2015, 12:21 PM   #7
killertux
Member
 
Registered: May 2015
Location: India
Distribution: Ubuntu 14.04 LTS
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
You should use the one you know already. And also you may try to start without ide, with a simple editor and command line tools (like compiler, make) just to be familiar with those things
Thanks for your reply !
The only thing I am familiar with is Turbo C++ running in an emulator which is worthless because you can only run the program within the IDE. The executable files it generates does not even support 32 bit os.So it is fruitless.As a newbie, I do not know how to use editor and command line together to do the thing.But I do wish to learn them !
 
Old 05-26-2015, 12:28 PM   #8
killertux
Member
 
Registered: May 2015
Location: India
Distribution: Ubuntu 14.04 LTS
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Hiesso View Post
Hi Killertux,

I'm fairly new to programming (just started about a couple of years back), I've only used two IDEs for programming in C++: Visual Studio from Micro**** and Eclipse. I recommend Eclipse, its easy to use and there is a lot of support out there.
Hi Hiesso !
Thanks for your quick response. Isn't Visual studio for Win**** is commercial and I would definitely try Eclipse before picking one.
Again thanks....
 
Old 05-26-2015, 12:46 PM   #9
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,459

Rep: Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053
Quote:
Originally Posted by killertux View Post
As a newbie, I do not know how to use editor and command line together to do the thing.But I do wish to learn them !
Then that's where you should start. Far too many people start with the IDE, and then that's all they know. They can't use a text editor or build on the command line, they can't even use another IDE, all they can do is fill their C template from the IDE with code, click "Go", and hope it works. If you start with a text editor and building on the command line, you will already know what the IDE is doing in the background, which will let you tweak the IDE's settings intelligently when it's not doing what you want it to do, rather than just fiddling with buttons until something happens.

Are you already running Linux? If so, what flavor?

Doing it on the command line is very simple. To start with, open your favorite text editor (kate, emacs, vi, nano, pico, whatever) and type this:
Code:
#include <stdio.h>
int main(void) {
  printf("Hello World\n");
}
Save it as some file with a ".c" extension. Name it whatever you want. Then from the command line, cd into the directory where you saved it, and run:
Code:
gcc main.c
replacing main.c with whatever you called your file.

There should be no output from this command. When it's done, just run
Code:
./a.out
And it should print out the message.

Of course first you'll need to have the build tools installed, which depends on your distro (which is why I asked earlier).

Last edited by suicidaleggroll; 05-26-2015 at 12:48 PM.
 
2 members found this post helpful.
Old 05-26-2015, 12:54 PM   #10
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 5,124
Blog Entries: 10

Rep: Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815Reputation: 1815
I concur that you ought to learn how to write, compile, and debug programs via the command line first.

Reason being is that you'll learn the language properly.

Learn how to use gcc, and gdb (the debugger).

I highly recommend trying emacs as an editor, you can compile from within it and also invoke GDB from within it.
 
Old 05-26-2015, 01:03 PM   #11
killertux
Member
 
Registered: May 2015
Location: India
Distribution: Ubuntu 14.04 LTS
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
Why do you need an IDE in the first place? If you want one, that's fine, but in that case you need to specify why you want one (What are you looking to get out of it? What features do you need?) so that recommendations can be tailored to that goal.
Many Thanks for your help !
I need an IDE because the book I bought for C says an IDE would be better for any novice learner.And I have no idea of using the command line or compilers my friends here are speaking of.The things I want is to Write my program,debug it,compile it and get an executable file which will work on the respective OS.And I want it to be simple,distraction free and not with a bunch of this tools and that tools.It should not also be working like the fortran compiler that I used to learn earlier which does not support some syntax if it's a different version.
Again Thanks....
 
Old 05-26-2015, 01:09 PM   #12
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,203

Rep: Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675
here is a simple tutorial to start with. You can use any editor you want, for example gedit is ok. A relatively simple ide (or at least look like) is geany, you can try that too.
http://www3.ntu.edu.sg/home/ehchua/p.../gcc_make.html
 
Old 05-26-2015, 01:14 PM   #13
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,459

Rep: Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053
Quote:
Originally Posted by killertux View Post
I need an IDE because the book I bought for C says an IDE would be better for any novice learner.
I disagree completely

Quote:
Originally Posted by killertux View Post
The things I want is to Write my program,debug it,compile it and get an executable file which will work on the respective OS.And I want it to be simple,distraction free and not with a bunch of this tools and that tools.
Then it sounds like you don't want an IDE. Everything you just said you don't want is exactly what an IDE is. It's a big, bulky, slow GUI that's full of toolbars and options you will likely never use. They can provide some nice tools or options that let the developer write or debug code faster, but you should leave those advanced features for later.

Quote:
Originally Posted by killertux View Post
It should not also be working like the fortran compiler that I used to learn earlier which does not support some syntax if it's a different version.
You'll get that in any language. New features are always being added to compilers, if you're not careful to stick with a certain standard, you can run into problems with compatibility across compilers or compiler versions. Using compiler options to force your syntax to abide by a certain standard can help a lot here.

Last edited by suicidaleggroll; 05-26-2015 at 01:23 PM.
 
Old 05-26-2015, 01:18 PM   #14
killertux
Member
 
Registered: May 2015
Location: India
Distribution: Ubuntu 14.04 LTS
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
Then that's where you should start. Far too many people start with the IDE, and then that's all they know. They can't use a text editor or build on the command line, they can't even use another IDE, all they can do is fill their C template from the IDE with code, click "Go", and hope it works. If you start with a text editor and building on the command line, you will already know what the IDE is doing in the background, which will let you tweak the IDE's settings intelligently when it's not doing what you want it to do, rather than just fiddling with buttons until something happens.

Are you already running Linux? If so, what flavor?

Doing it on the command line is very simple. To start with, open your favorite text editor (kate, emacs, vi, nano, pico, whatever) and type this:
Code:
#include <stdio.h>
int main(void) {
  printf("Hello World\n");
}
Save it as some file with a ".c" extension. Name it whatever you want. Then from the command line, cd into the directory where you saved it, and run:
Code:
gcc main.c
replacing main.c with whatever you called your file.

There should be no output from this command. When it's done, just run
Code:
./a.out
And it should print out the message.

Of course first you'll need to have the build tools installed, which depends on your distro (which is why I asked earlier).
Hello suicidaleggroll,many thanks friend !
This sounds interesting and also spooky.But it also gives a geeky feeling.I am really wanna learn to program like this.
I am using Ubuntu 14.04 LTS .So tell me What I need to do.
Thanks again....
 
Old 05-26-2015, 01:25 PM   #15
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,459

Rep: Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053
Code:
sudo apt-get install build-essential
will install everything you need to compile C/C++.
 
  


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




All times are GMT -5. The time now is 12:03 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration