« Return to Thread: Running a C program

Running a C program

by NeillHog :: Rate this Message:

Reply to Author | View in Thread

Hello!
This is my first posting and I apologise in advance for any rules I may, inadvertently, be breaking.
I am definitely not a Linux guru but I am willing to learn.

I wrote a quick test program
#include <stdio.h>
main()
{
  printf("neill\n");
}

and compiled it on my kubuntu PC with gcc -o test test.c
Then chmod 744 test and ./test
It worked as expected.

I then transferred the test program to my NSLU (with unslung) and did
chmod 744 test and ./test

The result was ./test: ./test: 1: Syntax error: "(" unexpected

Could some one help me by explaining my error.
Thank you in advance.

Neill

 « Return to Thread: Running a C program