name conflict multiple libs
Here is the Question /*A.c*/ #include <stdio.h> int sayHi() { printf("Hi, this is AAAAA\n"); return 0; } int sayOut() { sayHi(); printf("Use this to introduce AAAAA\n"); return 0; } /*B.c*/ #include <stdio.h> int sayHi() { printf("Hi, this is BBBBB\n"); return 0; } int sayOut() { sayHi(); printf("Use this to introduce BBBBB\n"); return 0; } #include <stdio.h> extern int sayOut(); int main() { sayOut(); return 0; } # if link A first >gcc test.c -L. -lA -lB >./a.out Hi, this is AAAAA Use this to introduce AAAAA # if link B first >gcc test.c -L. -lB -lA >./a.out Hi, this is BBBBB Use this to introduce BBBBB First solution at first i use dlopen to explicitly load a dynamic library ...