Coffeehouse Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Calling C functions from a web language

Back to Forum: Coffeehouse
  • User profile image
    TimP

    Sorry for this being slightly off-topic, but since a few people here use Linux I thought this would be a good place to ask. I have the source code for a program I use and I want to interoperate with it. Specifically, I'm looking to call a C function which returns some data while the program is running. As far as I know, P/Invoke is not working on Mono. Is this possible in PHP or would I have to use C and CGI?

    Thanks,
    Tim

  • User profile image
    Rossj

    TimP wrote:
    Sorry for this being slightly off-topic, but since a few people here use Linux I thought this would be a good place to ask. I have the source code for a program I use and I want to interoperate with it. Specifically, I'm looking to call a C function which returns some data while the program is running. As far as I know, P/Invoke is not working on Mono. Is this possible in PHP or would I have to use C and CGI?

    Thanks,
    Tim


    Top hit for 'p/invoke mono' on google? ThisSmiley

  • User profile image
    TimP

    Thanks Ross and Beer.

    Beer, I'm relatively new to some Linux concepts and was wondering how I would pull a small portion of functionality out of the program. The function I need is in a particular C file (with no main function), in other words, it's not a executable file. On Windows I would put this into a DLL and call the DLL. What is the Linux equivalent?

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.