我正在处理一大段代码。当我使用 jam 命令编译代码库时,我收到很多错误,说明代码库中新添加的头文件中未定义对“some_function”的引用。此头文件包括所有其他相关的头文件。在编译代码库之前是否需要对 jam 文件进行更改?
bundlemgr_distrib_im.c:
#include "bundlemgr_distrib_config.h"
.
.
function{
.
.
retcode = bmd_cfg_init_active(bmd_im_evh);
.
.
}
bundlemgr_distrib_config.h:
cerrno bmd_cfg_init_active(event_mgr_p evh); //declaration
bundlemgr_distrib_config.c
#include "bundlemgr_distrib_config.h"
.
.
cerrno bmd_cfg_init_active(event_mgr_p evh)
{
//definition
}
构建日志:
...failed Link bundle/bundlemgr/test/obj-x86/bm_ut_distrib_attr ...
...skipped <installed!rp>bm_ut_distrib_attr for lack of <bundle!bundlemgr!test!obj-x86>bm_ut_distrib_attr...
.
.
bugfix/./bundle/bundlemgr/distrib/src/bundlemgr_distrib_im.c:269: undefined reference to `bmd_cfg_init_active'
另一个错误:
bundlemgr_distrib_acc_private.h(新添加的文件)
#include "bundlemgr_distrib_db_api.h"
#include "bundlemgr_distrib_db_private.h"
.
.
function{
.
.
rc = bmd_db_bdl_change_ifh(entry, ifhandle);
.
.
}
bundlemgr_distrib_db_private.h
cerrno bmd_db_bdl_change_ifh(bmd_db_bdl_h_type entry,
ifhtype ifhandle); //declaration
bundlemgr_distrib_db_api.c
#include "bundlemgr_distrib_db_private.h"
.
.
cerrno
bmd_db_bdl_change_ifh (bmd_db_bdl_type *entry,
ifhtype ifhandle)
{
//definition
}
构建日志:
...failed Link bundle/bundlemgr/test/obj-x86/bm_ut_distrib_attr ...
...skipped <installed!rp>bm_ut_distrib_attr for lack of <bundle!bundlemgr!test!obj-x86>bm_ut_distrib_attr...
Link bundle/bundlemgr/test/obj-x86/bm_ut_distrib_mbr_info
bundle/bundlemgr/test/obj-x86/bundlemgr_distrib_test_errdis_owner.o: In function `bmd_acc_bdl_set_ifhandle':
/nobackup/pzambad/ci-521-bugfix/./bundle/bundlemgr/distrib/src/bundlemgr_distrib_acc_private.h:3618: undefined reference to `bmd_db_bdl_change_ifh'