Whoops - finger troubles....

On Mon, Oct 7, 2013 at 8:16 PM, Dave Hylands <dhyla...@gmail.com> wrote:
>
> Hi,
>
>
> On Sat, Oct 5, 2013 at 2:31 AM, <ignacio.mata...@gmail.com> wrote:
> >
> > hi,
> >
> > Looks like there is something wrong in eclipse. I compiled the code
gettimeofday directly from ubuntu terminal and it works properly. Also the
code works in my beaglebone :-)
> >
> > BUT... :-S. I am trying to run my code. It compiles and run under
ubuntu but when i try to run in in my beaglebone i got the error:
> > -sh: ./hil: cannot execute binary file
> >
> > I am using the following command in my beaglebone:
> > chmod ugo+x hil
> > ./hil
> >
> > I am using this includes:
> > stdio.h
> > stdlib.h
> > math.h
> > sys/time.h
> >
> > any suggestion? thanks in advance to everybody
>
> Try using the "file" command on your program. It will tell whether you
built an ARM executable or an x86 executable. x86 executables will produce
the error you're seeing when you try to run them on the beagleboard (since
the beagleboard uses an ARM processor).
>
> file ./hil
>
> For example: file /bin/ls on my x86 ubuntu machine shows:

/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked (uses shared libs), for GNU/Linux 2.6.24,
BuildID[sha1]=0x37cdd635587f519989044055623abff939002027, stripped

and file run on an executable for the beagleboad will typically show
something like:

bash: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked
(uses shared libs), for GNU/Linux 2.6.16, not stripped

So as Tux mentioned, you're probably using the host compiler instead of the
cross compiler to build your program.

--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to