- 论坛徽章:
- 0
|
回复 1楼 alpbrook 的帖子
在compiler.pdf中看到这么一段
Notes
The default option, -bdynamic, ensures that the C library (lib.c) links dynamically. To avoid possible problems with unresolved linker errors when linking the C library, you must add the -bdynamic option to the end of any compilation sections that use the -bstatic option.
改成如下
xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -c snmptop.c
xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -c snmptrap.c
xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -c utils.c
xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -c ./machine/m_aix5.c
xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -bdynamic -o snmptop snmptop.o snmptrap.o utils.o m_aix5.o -lperfstat -lm
编译是通过了,但没有验证运行情况 |
|