I’ve cross-compiled a c++ program on my Host-PC using Eclipse and have setup the compiler settings and paths to arm-linux-gnueabi…
The program compiles without errors or warnings an does not run on my Host-PC - which is ok - because it’s compiled for arm.
when I sftp the compiled program to my BBB with ubuntu 13.04 and try to start it, I get the message: No such file or directory.
then I boot the latest Angstrom image copy the same file an it runs !
I figured out that on my ubuntu image is a different g++ compiler version than on the Angstrom.
Ubuntu: 4.7.xxx , Angstrom 4.6.xx Host-PC 4.6.xx
But: when I compile the source manually on the Ubuntu Image than it runs !
Does anybody has any suggestions ?
Thanks in advance, Harald.
I think you should give us the command that you are using to run your program (and the result).
Perhaps it’s about the bin path. Did you test the program compiled in the BBB in the same directory than the cross compiled one ?
Try running the program by calling its full name: ./progname . If this
works, you are having PATH problems, q.v.
yes, both files are now in the same directory, but the result is the same. I’ve noticed a different size .
test1 does not run. test2 runs perfect.
drwxrwxr-x 2 ubuntu ubuntu 4096 Jun 25 15:43 ./
drwxr-xr-x 7 ubuntu ubuntu 4096 Jun 25 14:02 …/
-rwxrwxrwx 1 ubuntu ubuntu 13918 Jun 25 13:59 test1*
-rwxrwxrwx 1 ubuntu ubuntu 14458 Jun 25 15:40 test2*
bash: ./test1: No such file or directory
I think it’s because of the differnent compiler versions. When I install the gcc ant the g++ with the apt-get install xxx than it installs the newest versions that is 4.7.3 for the BBB. The cross-compile version on my host-pc is 4.6.3.
Your problem is most likely libraries and/or a mixup of hard vs soft floating point.
% ldd ./test1
It will show you what, if any, libaries are missing.
buntu@arm:~/projects$ ldd ./test1
not a dynamic executable
ubuntu@arm:~/projects$ ldd ./test2
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6eb7000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6e94000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6db1000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6d46000)
I know the videos of Derek Molly. I will recheck my configuration in Eclipse.
Thanks again to all answers.