免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1872 | 回复: 0
打印 上一主题 下一主题

小程序无法编译,请帮忙查看! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-07-28 18:22 |只看该作者 |倒序浏览
enviroment:
OS:aix V5203
compile:IBM VAC V7.0

source code:

asm@zhguowen_sv:/asmdev/asm$more errlog_open.c
#include <stdio.h>
#include <fcntl.h>
#include <errlog.h>


int mode;
unsigned int magic;
errlog_handle_t *handle;
extern int errlog_open(char *path,
int mode,
unsigned int magic,
errlog_handle_t *handle);


main()
{
mode=0;
magic=LE_MAGIC;
int rc;
rc=errlog_open(NULL,mode,magic,handle);
if (rc==0)
{
printf("\nopen errlog sucessful!\n");
}
else
{
printf("\nopen errlog failed!\n");
}
}

error information:
asm@zhguowen_sv:/asmdev/asm$xlc -bnoquiet errlog_open.c
(ld): halt 4
(ld): lrgpage 0
(ld): savename a.out
(ld): filelist 4 1
(ld): i /lib/crt0.o
(ld): i errlog_open.o
(ld): lib /usr/vac/lib/libxlopt.a
(ld): lib /usr/lib/libc.a
LIBRARY: Shared object libc.a[shr.o]: 2526 symbols imported.
LIBRARY: Shared object libc.a[meth.o]: 2 symbols imported.
LIBRARY: Shared object libc.a[posix_aio.o]: 17 symbols imported.
LIBRARY: Shared object libc.a[aio.o]: 11 symbols imported.
LIBRARY: Shared object libc.a[pse.o]: 5 symbols imported.
LIBRARY: Shared object libc.a[dl.o]: 4 symbols imported.
LIBRARY: Shared object libc.a[pty.o]: 1 symbols imported.
FILELIST: Number of previously inserted files processed: 4
(ld): resolve
RESOLVE: 42 of 3449 symbols were kept.
(ld): addgl /usr/lib/glink.o
ADDGL: Glink code added for 4 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object}
RLD: Address Section Rld-type Referencing Symbol
----------------------------------------------------------------------------------------------
.errlog_open [36] ER PR errlog_open.c(errlog_open.o)
00000040 .text R_RBR [12] .main
ER: The return code is 8.

补充一句:手册中讲到errlog_open功能:Opens an error log and returns a handle for use with other liberrlog.a functions.
因此此函数应与liberrlog.a有关,可就是不知该怎么做

[ 本帖最后由 zhguowen 于 2007-7-28 19:01 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP