1. Dynamic loading of functions
b. Your main program and interpret function should be compiled separately. In the file ~/.bash_profile export the environment variable LD_LIBRARY_PATH export LD_LIBRARY_PATH=.
This will take effect the next time you log in. To make this effective in your current session you would have to export the variable manually.
i. replace the default config file with your 2nd config file and send a SIGHUP signal to your program. Verify that your program is now running the implemented functions.
ii. Include code that loads the functions (see example pluginShell.c) and modify it so that it also loads help.
iii. When the program starts up it should call the routine that loads the 1st config file. V
The dynamic loading of function is a way of dynamically invoking the function call. Because compiler has the limited knowledge of what we are up to, so we face run time error if we are not using the correct input or output.
Example - If we are running different function, which is depending on the user input then we will define the ifunc as integer no undo.
Comments
Leave a comment