A
athresh
I have created a shared library with main() .Still it is compiled and
loaded during invocation. Below is the code and build file.
sample_test.cpp
int test_method(CfgChkSession &s)
{
cout<<"working"<<endl;
return 1;
}
int main()
{
cout << "Hello, This is a sample test\n";
return 0;
}
Sample build file is :
all:libcfgchk_samplelib.so
libcfgchk_samplelib.so : $(OBJS)
$(GCC) -shared -Wl,-soname,libcfgchk_samplelib.so -o
libcfgchk_samplelib.so $(OBJS) - -lutil -lext_stl -lprocess -lnsl -
lcfgchk_utils -ldl
I am curious to know how the .so in invoked in the program which has a
main(). Please update me on the same
loaded during invocation. Below is the code and build file.
sample_test.cpp
int test_method(CfgChkSession &s)
{
cout<<"working"<<endl;
return 1;
}
int main()
{
cout << "Hello, This is a sample test\n";
return 0;
}
Sample build file is :
all:libcfgchk_samplelib.so
libcfgchk_samplelib.so : $(OBJS)
$(GCC) -shared -Wl,-soname,libcfgchk_samplelib.so -o
libcfgchk_samplelib.so $(OBJS) - -lutil -lext_stl -lprocess -lnsl -
lcfgchk_utils -ldl
I am curious to know how the .so in invoked in the program which has a
main(). Please update me on the same