Jump to content
  • Advertisement
Sign in to follow this  
Count_Zero99uk

Need some help getting started programming on Linux

This topic is 2287 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there,

As a lot of you will no doubt be aware the Raspberry Pi is due out soon. And this little computer intends to launch a new set of children into computing.

Well i for one think that this is a great thing. Ive put my name down to get one, and with it im hoping i can get my nephew whos 10 intersted.

Now ive been here before asking for advice and unfortunatly this has usualy ended up with me loosing heart and returning books to the library in discust. However this time because of my Nephew i am driven to learn this time.

Now my first issue is Linux, never used it before, im currently in the process of turning a spare laptop into a linux based machine and thats going well, im getting some great help from a couple of forums on getting that set up. So no need for any help with that from you :) However as for the programming im not sure where to begin.

I have several books on C++ and ive read that Python is going to be the language of choice for the Raspbery Pi so im hoping someone can tell me how to get set up so i can start writting programms for these on Linux.

For the PC i know that i needed a compiler and have installed an IDE before now. A book i currently have suggested Dev-C++ im not sure if this is a catchall term of the title of a specific program. The books is "C++ without fear" 2nd editon. They have provided a link but that seems to just be to a windows version - im not sure if that would be compatible with linux.

As for python im not sure what i need or where to start, so ive come here for your advice on this matter.

Also if you know any good books/sites or even languages that are aimed at getting children into programming as well that would be fantastic.

Thanks as allways
Brian

Share this post


Link to post
Share on other sites
Advertisement

A book i currently have suggested Dev-C++
[/quote]
Since when is that book editioned? 2000? Dev-C++ is too outdated.

Also if you know any good books/sites or even languages that are aimed at getting children into
[/quote]
As far as im concerned, if you are trying to learn programming, I would say not C++ AND for kids, gosh. Just stick with python, There are many tutorials out there for programming with python in linux, a quick googling can give you wonders.
Also , i have found this awesome website.
http://www.linuxjour...om/article/3946
Good luck!

Share this post


Link to post
Share on other sites
Hmm book was done 2011. Im still wanting to do C++ for myself. So what would you recomend as an IDE for the begginer if that one is too outdated?

Thanks for the other stuff on python though :)

Take care
Brian.

Share this post


Link to post
Share on other sites
Visual Studio Express is free on Windows.

CodeBlocks is free (open source), cross-platform, actively in development, and has had 2 fairly solid releases. If you want to learn C++ and possibly do so in a linux environment, I would recommend it. I personally use it for all my C++ development (linux and windows).

http://www.cprogramming.com/code_blocks/ shows how to setup CodeBlocks and continues into a C++ tutorial. Might be a good place to at least start getting used to CodeBlocks as an IDE.

Share this post


Link to post
Share on other sites
If you are interested in programming in Linux, I think you should start without an IDE. Just learn how to use some text editor (I use emacs, but perhaps others can suggest more modern options that are reasonable for programming) and then compile from the command line. If you later find some IDE that makes you more productive, that's great; but you don't need it to get started.

Share this post


Link to post
Share on other sites
I would recommend you start with Python. Python is also available for Microsft Windows. It even has a game development library available (pygame). Many consider Python to be the BASIC of the 21st century. It is also considered the systems programming languages for some windely-used Linux distributions such as Ubuntu and its progeny Mint.

Share this post


Link to post
Share on other sites

If you are interested in programming in Linux, I think you should start without an IDE. Just learn how to use some text editor (I use emacs, but perhaps others can suggest more modern options that are reasonable for programming) and then compile from the command line. If you later find some IDE that makes you more productive, that's great; but you don't need it to get started.


I have to agree with this statement. At work we use exclusively gvim, make files, gdb for debugging (sometimes ddd). I used to use Visual Studio extensively with Windows, but on Linux it is not really necessary (although using an IDE such as Code::Blocks is perfectly fine).

The best advice I can give when it comes to linux is that man pages are your friend. If I don't know what a command does, being able to type "man grep" for instance is very handy.

I find that it is nice to setup aliases to automate certain things such as all of the make steps needed to clean/compile/install (make clean, making the make files, includes, all, install, ect).

Also stick with Python where possible. If you must use C++ then you will need to cross compile it if you want to do the development on a PC. This is because the Raspberry Pi uses an ARM processor... If you are doing the development on the device itself then you will probably be ok with building normally, as long as you are aware of some of the gotchas. Make sure you recompile any C/C++ code for the ARM processing architecture if you are using it from another project/if it was compiled for an x86/x64/other architecture.

Share this post


Link to post
Share on other sites
You got me a bit curious, so I did some research yesterday.

It is possible to run the Raspberry Pi kernel and os by using QEMU. There is a QEMU for windows but I had no luck getting it to work (at least on Windows 7). I tried using the qemu-img command to expand the size of the img, I got the zImage from some source (the kernel), and I used QEMU manager with what I believe to be the correct processor settings, but nothing happened. So I think you can run the software, but you might either have to set up a virtual machine running linux in windows, or just have a machine that runs linux to make QEMU work. Yes I know that running an emulator inside of a virtual machine is a bit wonky, but at least it is possible.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!