Hello world C++ example:

mkdir ~/helloplus
cd ~/helloplus
nano helloplus.cpp
// 'Hello World!' program
#include <iostream>
int main()
{
  std::cout << "Hello World!" << std::endl;
  return 0;
}
mips-openwrt-linux-uclibc-g++  helloplus.cpp -o helloplus
mips-openwrt-linux-uclibc-strip helloplus

scp helloplus root@192.168.0.102:/mnt/sda1

Arduino Yun:

opkg update
opkg install libstdcpp
root@Arduino:/# /mnt/sda1/helloplus
Hello world!

 

Comments powered by CComment