How To create, edit, and execute C++ programs on the ASUS EEE PC.

Please remember to leave constructive criticism only.

Step 1: Learn C++

If you already know C++ then you are welcome to skip this step....

If you don't then I suggest you go to one of these sites and learn C++ first.

The information won't be very useful if you can't practice on an IDE, so give the tutorials a while and see if this really looks like something you want to get into.




Use these or just go to Google and search for "C++ Tutorial"

Step 2: Open a Terminal

Easy Mode:

Easy mode is the interface that comes default with the EEE PC. The picture below with the orange background is an screenshot.

to get to a terminal just go to the desktop and press: 'Ctrl' + 'Alt' + 'T' (Press keys as though you were typing 'Ctrl + Alt +Del' )

Advanced Mode:

If you are in 'Advanced Mode' then I assume that you are knowledgeable enough to know what it looks like.

Advanced Mode: Go to Start Menu >> Applications >> System >> Console

Windows XP:

If you have windows XP then you can't get to a Linux terminal like Xandros can (not
without buying an special crossover)

If you want to create a C++ program on Windows I suggest you get one of the following:

Dev-C++ (A great free editor that works like just about any other Windows App)

Visual C++ express (A Microsoft App that takes forever to download and install)

Step 3: Get G++

to compile the C++ from text into a program, I use G++

Obtain G++:

This step uses the terminal, use the previously mentioned method to get one up.

First you need to become a super user on your Console.



Hit 'Enter'

-> nano /etc/apt/sources.list

now when this file opens you will need to add the following line

deb ftp://ftp.us.debian.org/debian stable main contrib non-free

(This is if you are in the United States)

Then type: 'Ctrl' + 'X'
Hit 'Enter'
Then: 'Y'

Next, hit 'Enter' to close what you were just working on and get back to your command line

Back on the command line

->apt-get update

after that finishes you need to enter:

-> apt-get install build-essential

Make sure to put a capital Y for yes when the console asks you if you want to continue.

this will install the GCC and G++ compilers needed to program in C or C++

Step 4: Make the Program!

Go to the place where you want to have the program be in the console.


->kwrite ./your_program_here.cpp

your_program_here is where you put the name of your new program... (don't forget the .cpp)

this opens up a kwrite window


If you decided not to pay attention and did not learn C++, then I'll give you a simple "Hello World" program to test with.

Hello World Program:

(Start at the line under this one)

#include <iostream>

using namespace std;

main ( )

cout << "Hello World!";

cout << endl;


return 0;


(End at line above this one)

Hit save and exit kwrite.

back at the terminal type:

->g++ -g -o ./your_final_program_here ./your_original_program_here.cpp

Thanks to annex666 for catching that mistake

your_final_program_here is where you put the name of your final program (its wise to name it the same as your .cpp file)

Hit 'Enter'

Let g++ do it thing...(might take a while)

test it by typing:

->clear; ./your_final_program_here

If it works, close the terminal

If it doesn't, make sure that your terminal is in the same folder as your program.

Then try typing:


(make sure that you type the correct name of your program where 'your_final_program_here'
is and don't add the '.cpp' Executable programs in Linux don't have any extensions.)

The 'clear;' that went in front of your program just scrolls the terminal down so that it appears clean.

Step 5: Edit the Menu

This step is only if you have the advanced desktop.

If anyone knows how to put an Icon and a link to the program on easy mode please let me know.

Go to Start Menu >> Applications >> System >> Menu Editor

in the menu editor make a directory for your Programs.

Then under that new directory make a new item.

Call the Item whatever you want in the Name: box

If you want, pick an Icon for your program

Click on the folder icon by the Command: box and select your program.

Select the Radio button labeled "run In Terminal"

Hit Save.

To try out your program go to Start Menu >> your new directory >> your new program

There you have It!
<a href="https://www.instructables.com/community/CC-CPP-or-C-Plus-Plus-Programs-Will-Write/" rel="nofollow">https://www.instructables.com/community/CC-CPP-or-C-Plus-Plus-Programs-Will-Write/</a>
There are a two other C++ IDE's for windows that work well and are worth mentioning. I started using CodeLite recently on my newest win machine and I love it. It uses the win GCC port, MinWG and can also compile using the vc++ compiler if you wish to do so. CodeLite can be found @ <a rel="nofollow" href="http://www.codelite.org">http://www.codelite.org</a><br/><br/>The other that I like and use on another machine is Code::Blocks. It too uses MinGW, VC++ and pretty much any other c++ compiler or compiler suite out there. You can find it at <a rel="nofollow" href="http://www.codeblocks.org">http://www.codeblocks.org</a><br/><br/>Both IDEs work well and aren't as resource heavy as vc++ express. Furthermore, they're both FOSS which is great :) Since you can use gcc or mingw it makes portability a little bit easier, depending on what software you're writing of course.<br/><br/>-jlafay<br/>
hahaha sorry I just had to put this in but that's just too funny.<br/>&quot;Step 1: Learn C++&quot; it might as well say &quot;Step 1: Learn Japanese&quot;<br/>Anyway I've been teaching myself C++ for about 3 months now, it's pretty hard getting going but to add to your list of resources here, try <a rel="nofollow" href="http://www.3dbuzz.com">http://www.3dbuzz.com</a> and register as a free user, they have hours and hours of awesome videos on learning C++. The videos by themselves aren't going to teach you everything but gives a great knowledge base to work on with reading material. They have a testimonial section there and most users have said they tried with books first, failed, then after watching a few of their training videos it all became a lot more clear.<br/>
Thanks for the suggestion. Yeah, Everyone who knows what C++ is thinks that I learned it to quickly. Its kinda strange, I had everything I ever needed to create a GUI app in under five months but I still can't get a grip with Quadratics in math class.
Oh one more thing, it doesn't make a whole lot of sense at this point to learn C++ without an IDE... this should've been step 3 really...
Hmm... That make more sense than I care to admit. But many people I try to teach give up after a few lessons, and I'm told it happens to a lot of people, so I decided to let the user decide if they wanted to go through with this or not before setting them up with programs and have them crawling through the terminal, because if they don't find C++ to be their thing, its probable that the command prompt won't click either. Thank you for the post, I'll take it into consideration.
*Update* My EEE PC died this week. The stupid thing has been thrown off the roof of my 2 story house, dropped countless times, run over by a bike, thrown in a creek (that's an interesting one), hauled around in a 40 pound backpack, and used to coordinate a paintballing day (yes, it took 3 shots during the game) What finally broke it? A little bit of heat. I had dropped it at a friend's house and was running a bunch programs to make sure it still worked (not that there was any doubt) when it just turns off. As everything turns out, I had turned the fan off to save power at the friend's, forgot to turn it back on, and then it couldn't cool fast enough to keep up with the diagnostic programs. Luckily, the warranty hasn't run out yet. :)
I just put Win. XP on my eee. you know, to test it. Man its a lot more complicated to use, everything is ragtag trying to get all of the functionality.....
i want a eee so bad
Yeah, they're awesome.... I got a dev. version with a warrenty that lets me open it up and mess around without voiding it.
sweet, how do you add more SSD drive space, do you just replace a card?
NO. The SSD is hard-soldered to the main board, it cant be easily removed or changed. you can however add a usb HD or a SD card.
maybe ill try this when i get advanced desktop on my eee pc...
Cool, The First thing I thought of when I saw the EEE on display was "ONLY $400" Closely followed by "I could use that for C++..."
There's actually a better way: <a rel="nofollow" href="http://sourceforge.net/project/showfiles.php?group_id=215613&package_id=267376">EE PC SDK</a>. This will provide the best compatibility.<br/>
Interesting... What does it do?? (What step would downloading this onto the EEE make more simple??)
The EEE PC SDK comes with a complete OS (non live) and all the tools It need:<br/><ul class="curly"><li>Xandros Desktop Open Circulation Version 4.5</li><li>QT</li><li>Eclipse</li><li>QT plugin for Eclipse</li><li>Debian packaging wizard developed by Xandros</li></ul>With these, you can make GUI-based EEE PC application easily. G++ is still do able, but will be more complicated... and you still need the QT library, which is the library employed by the default EEE-PC-Linux's Window manager<br/><br/>Detail instruction <a rel="nofollow" href="http://downloads.sourceforge.net/eeecommunity/ASUS-SDK-Guide.pdf?modtime=1205924122&big_mirror=0">here</a><br/><br/>Also, don't forget that Some EEE PC comes with Windows XP (and in that case, Visual C++ express could be better), and there was rumors that future EEE PC will instead run Ubuntu Mobile Edition, which will use GTK libraries instead.<br/>
Ok, Thanks<br/><br/>I just got everything how I wanted it so I won't try this. It looks like something that would me more useful to know If you just got you EEE.<br/><br/><sub> PS: It sounds like a great instructible......</sub><br/>
The command line in the third image is incorrect - the name of the output should be placed directly after the -o flag, e.g: g++ -g -o my_binary source_1.cpp source_2.cpp
Thanks man, I'll edit that in now.
so does the eee pc run a linux based OS?
Yeah, what threecheersfornick said. It runs a custom Xandros and anything above the 2GB surf can handle win XP and Other Linux Distros.
Yes. Xandros, but tweaked a bit, I think. They can also run ubuntu, windows XP, or whatever else you want.

About This Instructable




More by mattameo213:Tunes To Go! Create C++ Programs on the EEE PC Cool Trick With iPods! 
Add instructable to: