linux - ld86 编译时出现 auto_start 错误

标签 linux bcc-compiler

我正在尝试在 Linux 下编译一个相当基本的程序,但我在使用 ld86 时遇到了问题。任何人都知道 auto_start 是什么?

$ bcc  -c tc.c
$ as86 -o ts.o ts.s
$ ld86 -d ts.o tc.o /usr/lib/bcc/libc.a
ld86: warning: _gets redefined in file /usr/lib/bcc/libc.a(gets.o); using definition in tc.o
undefined symbol: auto_start

更新 3/12/2012:当我定义自己的 printf() 时似乎消失了......

最佳答案

万岁!我找到了。

在 main.c 中调用 main() 时,我使用了这样的参数

int main(int i, char **c)

但是,如果我不使用任何参数……它就会消失

int main()

一定是因为我没有将任何东西从程序集传递到 main 中。 printf() 也与它无关,一定是同时玩了太多东西。

关于linux - ld86 编译时出现 auto_start 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9678340/

相关文章:

linux - 在没有 SSH 的情况下转发 X11?如何在另一台运行 X Server 的 Pc 上运行本地应用程序?

c - Linux C 在没有头库的情况下创建自定义 printf 函数

c - 寻找预处理器命令以删除代码中的命令

c - 如何使用信号安全函数将格式化字符串写入文件?

php - UTF-8贯穿始终

LINUX:将多个文件合并为 1

c - BCC 中的内联汇编(Bruce 的 C 编译器)- 如何使用 C 变量?

c - For 循环遍历数组导致无限循环

linux - 如何更改属于选定用户的所有文件的权限