regarding SWIG

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anish Chapagain

    regarding SWIG

    Hi..
    I'm new to SWIG and need to create Wrapper for C code,
    so, I have installed the SWIG already but doesnot know how to run it
    for generating Interface file...
    My C code is in message.c so what do i need to do the first
    step..uisng SWIG..i read the documentation but cannot grasp creating
    interface file.

    thank's anish
  • Diez B. Roggisch

    #2
    Re: regarding SWIG

    Anish Chapagain wrote:
    Hi..
    I'm new to SWIG and need to create Wrapper for C code,
    so, I have installed the SWIG already but doesnot know how to run it
    for generating Interface file...
    My C code is in message.c so what do i need to do the first
    step..uisng SWIG..i read the documentation but cannot grasp creating
    interface file.
    If it's pure C, stop using SWIG. Create a DLL/SO-file of your message.c &
    use ctypes to wrap that.


    Diez

    Comment

    • Hyuga

      #3
      Re: regarding SWIG

      On Jul 22, 5:34 am, Anish Chapagain <anishchapag... @gmail.comwrote :
      Hi..
      I'm new to SWIG and need to create Wrapper for C code,
      so, I have installed the SWIG already but doesnot know how to run it
      for generating Interface file...
      My C code is in message.c so what do i need to do the first
      step..uisng SWIG..i read the documentation but cannot grasp creating
      interface file.
      >
      thank's anish
      Not sure where you're having trouble. I can understand if there's a
      language barrier, but I think that the introductory SWIG documentation
      is pretty darn straightforward , even if you just look at the code, so
      I don't think there's anything that could be said here that's any more
      clear, as far as the basics are concerned. You'd have to explain
      exactly what it is you're stuck on.

      Comment

      • Stefaan Himpe

        #4
        Re: regarding SWIG

        Hi..
        I'm new to SWIG and need to create Wrapper for C code,
        so, I have installed the SWIG already but doesnot know how to run it
        for generating Interface file...
        As far as I understand, SWIG will not generate an interface file for
        you. You have to write it yourself, to tell SWIG what parts of your API
        you want to expose in python.

        HTH,
        Stefaan.

        Comment

        Working...