Hello World in C++ --- CORE9G25
Feature Hardware ref Linux Tutorials Debian Tutorials pinout

C++ (pronounced "See plus plus") is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell Labs as an enhancement to the C programming language and originally named "C with Classes". It was renamed C++ in 1983

G++ Installation

It's possible to install the GNU GCC on-board and use the board itself to compile natively your applications instead of a cross compiler on an external PC. To do that type:

debarm:~# apt-get update
debarm:~# apt-get install g++

Compile and run

Now try if the compiler works using an "Hello world !" source code example:

#include "iostream"

using namespace std;

int main(int argc, char *argv[]) {
    cout << "Hello world !" << endl;
    return 0;
}

​Save this code on your board in a file called hello.cc then compile it by typing:

debarm:~# g++ hello.cc -o hello

at the end run it by typing:

debarm:~# ./hello
Hello world !

Documentation Terms of Use
The Acme Systems srl provides this Debian system development and user manual.
The origin of these doc came from the website: http://www.acmesystems.it


  Tel: +86-755-29638421  |    Sales Email: market@armdevs.com |  Support Email: support@armdevs.com | Gtalk: armdevs@gmail.com  
www.armdevs.com | Copyright @2013 - CoreWind Technology Co.,Limited