| 发表于:2008-02-05 23:58:57 楼主 |
这个c的源代码,通过suse的终端命令 gcc -o xxx xxx.c 成功产生一个属性为可执行文件,名称为xxx的文件,但是在xxx所在文件夹里打开终端,直接输入xxx然后回车,出现:bash:bad command 上网查了差suse linux执行c程序的步骤,没有错啊! 于是在同样的终端里输入bash xxx 出现:cannot excute binary file 怎么会这样子? 下面是c的源码: #include <stdio.h> #include <inttypes.h> int main(void) { long long int a; a = 9223372036854775806ll; printf("a=%lld\n",a); printf("a=%ld\n",a); printf("a=%d\n",a); printf("a=%hd\n",a); getchar(); return 0; } 谁能告诉我如何才能在susu10.1 linux正确执行c程序啊?我的步骤到底错在哪里? |
|
|
|
|