Thread: Creating function

  1. #1

    Question Creating function

    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.


  2. #2
    Im a Capricorn vsriharsha's Avatar
    Join Date
    Feb 2002


    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.

  3. #3
    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.

  4. #4


    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.

  5. #5
    Join Date
    Aug 2001
    Groningen (NL)
    So your system should call scripts that the user can add at runtime? Then you need to write a parser to interpret the scripts.

  6. #6
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner Needs help in Dev-C++
    By Korrupt Lawz in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2010, 01:17 AM
  2. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  3. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  4. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  5. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM