Results 1 to 8 of 8
Hi Guys and Gals,
Iīve finally got myself a linux thing going on via VirtualBox on my mac and chosen Ubuntu, it seems the logical place to start.
Now to ...
- 08-16-2011 #1Just Joined!
- Join Date
- Aug 2011
- Location
- London UK
- Posts
- 28
Developer tools
Hi Guys and Gals,
Iīve finally got myself a linux thing going on via VirtualBox on my mac and chosen Ubuntu, it seems the logical place to start.
Now to start playing with it.
Let me give you a little background so you can better assess my question.
I am studying Mechatronics Engineering at Uni, Thatīs Robotics and automation for those that dont know the word. I use things like AutoCAD and Matlab quite a bit, and I am learning to program mainly in C/C++ and also learning python to help me along the way. On the mac, I use Xcode because itīs there and I am trying to learn Terminal. I want to be a proper geek basically, not a part time one.
Browsing through Ubuntu and the software center, I have found Netbeans and Eclipse and got them both to see which I would end up prefering. Eclipse is now stumping me as there is no C/C++ bit for it.
So my questions are really, firstly how do I deal with the C/C++ bit, where do I find that, and can I start a little bit of discussion on the different environments and peoples preferences.
Kind Regards
Jonny.
- 08-16-2011 #2
Have a look at code::blocks which is quite a nice light IDE. Try installing the build-essential package (run
in a terminal) which will give you all the libraries and compilers.Code:sudo apt-get install build-essential
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 08-16-2011 #3Just Joined!
- Join Date
- Aug 2011
- Location
- London UK
- Posts
- 28
I'm obviously too new to this, as I don't understand what it is I have just installed, and I don't know where to find it to use it.
Is it part of net beans or eclipse, or is it something on it's own.
Also when I went to the website to find it I find they don't do an ubuntu one.
I need hand holding on this one I am afraid.
Kind regards
Jonny
- 08-16-2011 #4
Build essential is a "meta package". It installs various compilers including c and c++ along with the headers and libraries that interact with the system such as stdio.h.
To use gcc (the c compiler) you might create a simple program such as
using any text editor and then assuming you saved it as helloworld.c in your home directory, you would open a teminal and runCode:#include <stdio.h> void main() { printf("Hello World\n"); }which would either compile the program to an executable called helloworld or spit out a whole raft of errors.Code:gcc helloworld.c -o helloworld
So, these are stand alone items that you can use. I'm afraid I don't know about eclipse or netbeans but code::blocks found and configured itself to use the compilers when I first ran it.
Code blocks may be in the repo so again in a terminal, run the followingand if it's found, runCode:apt-cache search codeblocks
to install the IDE. If you are more comfortable installing through a GUI, you can search for things and install through synaptic.Code:sudo apt-get install codeblocks
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 08-17-2011 #5Just Joined!
- Join Date
- Aug 2011
- Location
- London UK
- Posts
- 28
Thanks elija,
Do you see what I mean about being walked through it, I have just done a helloworld program and it has compiled I think, but I can't run it.
How do I run the executable I have just built?
typing in the file name returns a command not found error?
I feel really thick here, as this seems so simple there is no info on the web anywhere on this, been on google now for an hour with no luck????????????
- 08-17-2011 #6
Make sure you are in the directory where the program is and try running
asuming that's what you called it. You may need to tell Linux that people are allowed to run it as a program in which case runCode:./helloworld
to do so.Code:chmod +x helloworld
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 08-18-2011 #7
Anjuta is going to make things a lot Clearer. Your Package-Manager can most likely install it for you. After installing it will be found in the Applications> Programming menu. Do a web search of " Install Anjuta (whatever your distro name is) "or whatever your Package-Manager name is .
- 08-22-2011 #8Just Joined!
- Join Date
- Aug 2011
- Location
- London UK
- Posts
- 28
Thanks Elija, that clears it all up for me.
As for making things easier, that's not what I am after, I want to learn how to do it anyway and learn how to get around it if I come across problems. I have a mac for my everyday work, being stuck with this is part of the fun in my mind.
Regards everyone
Jonny


1Likes
Reply With Quote