我有一个可执行文件(a.out
),它链接到一个动态库(b.so
),
和b.so
链接到另一个动态库(c.so
)。现在我需要
将c.so
更改为d.so
,是否需要重新编译a.out
?
以下是整体代码结构(更改前):
/* a.out : main function */
int main(int argc, char *argv[])
{
printf("Main start\n");
callB(); /* callB is located in b.so */
printf("Main end\n");
exit(0);
}
/* b.so : callB function*/
void callB()
{
printf("callB strart\n");
callC(); /* callC is located in c.so */
printf("callB end\n");
}
/* c.so : callC function*/
void callC()
{
printf("callC strart\n");
/* Do something else */
printf("callC end\n");
}
以下是整体代码结构(更改后):
/* a.out : main function */
int main(int argc, char *argv[])
{
printf("Main start\n");
callB(); /* callB is located in b.so */
printf("Main end\n");
exit(0);
}
/* b.so : callB function*/
void callB()
{
printf("callB strart\n");
callD(); /* callD is located in d.so */
printf("callB end\n");
}
/* d.so : callD function*/
void callD()
{
printf("callD strart\n");
/* Do something else */
printf("callD end\n");
}
请帮帮我,我完全失去了!