I'm trying to cross compile a cpp application for my Raspberrypi board from my virtual Ubuntu machine. I first installed the required development tools like this:
sudo apt-get install build-essential
sudo apt-get install g++-arm-linux-gnueabihf
sudo apt-get install gdb-multiarch
Afterward I created the following hello world application:
#include <iostream>
using namespace std;
int main() {
cout << "Hello Worl from Pi" << endl;
return 0;
}
I compiled the program like this:
arm-linux-gnueabihf-g++ hello.cpp hello
When I execute the binary I get in the console the output "Speicherzugriffsfehler" which is German and means something like "memory access problem".
What might be the problem?