c 代码编译但不在 kubuntu 中执行

yur*_*rib 3 linux kubuntu compile ubuntu

我在 VirtualBox 中运行 kubuntu 9.10,我用 C 编写了最简单的“hello world”程序,代码编译,我通过调试器运行它,它似乎运行良好。唯一的问题是没有实际打印到控制台......有什么想法吗?

继承人的代码:

#include <stdlib.h>
#include <stdio.h>
int main (int argc, char **argv) {
  printf("hello world");
  return 0;
}
Run Code Online (Sandbox Code Playgroud)

我编译它使用:

gcc -c test.c -o test.o
gcc test.o -o test
Run Code Online (Sandbox Code Playgroud)

我没有收到错误消息。

Cra*_*aig 11

您的路径之前有 /usr/bin 。

尝试将其作为 ./test 运行

/usr/bin/test 只是退出,没有输出