- 论坛徽章:
- 0
|
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 编辑 ] |
|