Executing of C++ arm code in Eclipse fails

31 views
Skip to first unread message

Pavel Yermolenko

unread,
Sep 23, 2020, 9:55:58 AM9/23/20
to BeagleBoard
Hello,

In his book "Exploring BeagleBone", Derek Molloy provides example of executing of the source code that built on host machine using cross toolchain. For that QEMU emulator must be installed on host machine.

In terminal it works fine when a source is built with -static option:

pavel@ALABAMA:~/bbb_cross_toolchain_code$ arm-linux-gnueabihf-g++ -static testcross.cpp -o testcross
pavel@ALABAMA:~/bbb_cross_toolchain_code$ ./testcross
Testing cross compilation for armhf
pavel@ALABAMA:~/bbb_cross_toolchain_code$


But in Eclipse it doesn't work although I added -static in cross-compiler options.

Screenshot from 2020-09-23 15-46-33.png


Screenshot from 2020-09-23 15-47-45.png


Any comments ?

Thanks.



Robert Nelson

unread,
Sep 23, 2020, 10:12:49 AM9/23/20
to beagl...@googlegroups.com
For some reason the images didn't show up in mail..

/lib/ld-linux-armhf.so.3: No such file or directory

Regards,

--
Robert Nelson
https://rcn-ee.com/

Pavel Yermolenko

unread,
Sep 23, 2020, 10:18:17 AM9/23/20
to BeagleBoard
Here is execution in eclipse:

Here is Eclipse compiler options:

On Wednesday, September 23, 2020 at 4:12:49 PM UTC+2, RobertCNelson wrote:

Pavel Yermolenko

unread,
Sep 23, 2020, 10:32:39 AM9/23/20
to BeagleBoard
Resolved.
-static isn't compiler, but linker option.
Regards.

Pavel Yermolenko

unread,
Sep 23, 2020, 10:50:09 AM9/23/20
to BeagleBoard

jonnymo

unread,
Sep 23, 2020, 11:02:35 AM9/23/20
to Beagle Board
Did you look on the book website?

Look at the response by Brendan Lynskey regarding adding the following in your "~/.bashrc"
   export QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf  

You could do this on the command line as well but it will not be persistent between logins.

Jon

On Wed, Sep 23, 2020 at 7:50 AM Pavel Yermolenko <py.o...@sunrise.ch> wrote:

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/e0bd44c6-bd22-4707-83e8-e0cd73f64934o%40googlegroups.com.

jonnymo

unread,
Sep 23, 2020, 11:15:43 AM9/23/20
to Beagle Board
Sorry, I see you already solved this and the link I provided was for the Pi and BB.
There is a message fairly recently at the BB version of the book regarding this issue:

Jon
Reply all
Reply to author
Forward
0 new messages