I have 2 process A and B. Both process shared same shared object file called common_add.so
I defined the variable g_test_variable in process A.
But if i not define the variable g_test_variable in process B and open the common_add.so file using dlopen & dlsym and invoke the add_double function which is not using g_test_variable variable ,will i hit any issue ?
/*
* File Name : common.c
* This file packaged as part of common_add.so
*/
extern int_32 g_test_variable; //declaration
int add_int(int a, int b)
{
if(g_test_variable)
printf("somthing");
return a+b;
}
double add_double(double a, double b)
{
return a-b;
}