Results 1 to 2 of 2
You have 2 write two shared object files. suppose 1.so and 2.so each hv 2 functions f1(char*) and f2().
Write a main prog such dat it takes 2 arguments say ...
- 07-17-2009 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 1
Shared objects
You have 2 write two shared object files. suppose 1.so and 2.so each hv 2 functions f1(char*) and f2().
Write a main prog such dat it takes 2 arguments say '1' & '2'. In this case the 1.so must get linked dynamically and call f1 (char*) - which is present in 1.so file (coz '1' is da first parameter) and '2' must be passed to it (which is present as a second command line parameter for main). Now f1(char *) should dynamically link 2.so and call f2() from it.
If the commandline parameters are '2' & '1' den in dat case 2.so must get linked dynamically and call f1(char*) - which is present in 2.so file (coz '2' is da first parameter) and '1' must be passed to it(which is present as a second command line parameter for main ). Now f1(char *) should dynamically link 1.so and call f2() from it.
Give me 3 source files and 3 make files.
- 07-17-2009 #2
Posting homework questions is against forum rules.


Reply With Quote
