小编Nee*_*tal的帖子

so库中定义的同名全局变量

我想知道以下场景中的行为:-

//file1.c : Main file of a user-space process,say Process X.
int a; //GLobal variable in file1.c
func(); //Library function

//file2.c :Part of .so used by Process X.
int a;
void func()
{
    a=0;//Access variable a.
}
Run Code Online (Sandbox Code Playgroud)

如果 Process X 调用func()库的函数,会发生什么?

c linux shared-libraries

5
推荐指数
1
解决办法
949
查看次数

标签 统计

c ×1

linux ×1

shared-libraries ×1