i'm not on here asking to solve a bug or problem , but just to get an understanding about something from those who have more experience.
I bought a BeagleBone Black (Debian installed). I am cross compiling C++ for it on Windows by using gcc-linaro and the make utility that comes with yagarto tools.
All works and executes fine when developing C code with the C compiler.
With C++ however when I build an executable and transfer it to the bone (via WinSCP), I get the following linker error on execution :
"./leds1: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./leds1)"
I'm not asking to solve that issue exactly.
Does it mean that when building on the host, the library path defined on the host is different to that on the bone?
If however I add "-static" to my linker command in my makefile to statically link libraries at compile time on the host, the code then executes on the bone, but not sure if this is the cause of some other issue i'm having.
Is it ok to statically link the libraries in this case? I'm wondering then could the library code which is statically linked be different to the code it would link to on the bone in the case of dynamic linking?
When I do static linking, does it mean there will be no more unresolved linkages whatsoever (every function is implemented) when the executable is built? The linux system() function that I am calling for example is completely built into my executable then?
Many questions sorry, but all relating to the same misunderstanding. Thanks in advance for your knowledge.