hello world cross compile

william estrada
Hi group,

  I'm trying to cross compile a simple C hello world program for the 6410.

The program:
 cat hello.c
#include <stdio.h>
int main()
{
  printf("Hello, world\n");
  return 0;
} 

the compile:
arm-gp2x-linux-gcc -g -I. hello.c -o hello-world.arm

the output:
hello-world.arm: ELF 32-bit LSB executable, ARM, version 1, dynamically
linked (uses shared libs), for GNU/Linux 2.0.0, not stripped

transfer to 6410 and run:

 ./hello-world.arm 
-sh: ./hello-world.arm: not found

the message is that something within the program is missing?

any ideas??

davef
Is hello-world.arm executable?

Check your permissions.

rumata
Did you check the permissions? Sometimes when you copy executables they
lose the 'x' flag (depends on how you copy them in fact). 

To check it, go to the containing folder on whatever 6410 device you have
and run 
    ls -la 
to set it as executable, run
    chmod +x hello-world.arm

william estrada
OK, I recompiled the program and use the -static option, it now runs.