Hi,
I want to know if there a way to create a C function on the run-time and then assign the function to a pointer so that it can be called later.
Thanks.
Hi,
I want to know if there a way to create a C function on the run-time and then assign the function to a pointer so that it can be called later.
Thanks.
What exactly do u mean by a Creating a Function during RUN-TIME?? Sounds literally Strange. Can u elaborate your question. Just give me the situation which made u come out with this idea.
Regards
it doesn't sound too "Strange."
Maybe you should embed a scripting engine into your program and then call functions from the script during the programs execution? try lua.
I've a system in-place already and the system will call other functions based on a list of function pointers. The system works fine if I've those functions implemented on the compilation time; since then I will have the list of function pointers.
But, now we need to extend this system to allow user dynamically create "some scripts". Then we need to link each script to the system so that the system still exec those 'scripts".
That's why I need a way of somehow to create a "Stub" function on the run-time and do the binding with one side to the System and other side to the scripts.
So your system should call scripts that the user can add at runtime? Then you need to write a parser to interpret the scripts.
We already have the parser for other project and we are going to use it.
Then, we need to add this binding cap to the parser for our project.