Skip to main content

Thread: C programming in Ubuntu


hi,

want compile , run simple hello world prgm.

code:
#include <stdio.h>    int  main(int argc, char **argv){          printf("hello world\n");          return 0;  }
i compiled using
code:
gcc -o hello hello.c
but when try run using
code:
. hello
i error
code:
bash: .: hello: cannot execute binary file
what missing?? plz help.

on solaris machines @ uni, run program don't have start '.'. ie: run hello, type hello. how u work in ubuntu?

thnx,

ahh figured out. need type
code:
./hello
run it.

still, in solaris need type program name run. ideas how in ubuntu?

thnx


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Packaging and Compiling Programs C programming in Ubuntu


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support