Recent

Author Topic: Delphi SWIG  (Read 3897 times)

guest65405

  • Guest
Delphi SWIG
« on: March 29, 2020, 12:48:17 pm »
I search the internet and came across this article: http://www.fmxexpress.com/create-wrapper-interfaces-for-c-and-c-libraries-using-swig-with-delphi-support/

However, the version from this repo didn't build: https://github.com/FMXExpress/swig-delphi

But the one from this repo did: https://github.com/lynxnake/swig

I didn't test if it works or not. But I just want to share it with you.

p/s: The last commit was from 2017, it seemed he abandoned it.

Update: Don't use this tool. It will not help anything but only worsen the problem. It generated binding is a mess and doesn't work. This tool need a paid professional working fully on it to be usable. But now, just don't use it. h2pas is still the preferred solution.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Delphi SWIG
« Reply #1 on: March 30, 2020, 01:24:06 pm »
However, the version from this repo didn't build: https://github.com/FMXExpress/swig-delphi

But the one from this repo did: https://github.com/lynxnake/swig
Could you please update wiki with your findings and specific release info that builds?
https://wiki.lazarus.freepascal.org/SWIG
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

guest65405

  • Guest
Re: Delphi SWIG
« Reply #2 on: March 31, 2020, 05:55:31 am »
However, the version from this repo didn't build: https://github.com/FMXExpress/swig-delphi

But the one from this repo did: https://github.com/lynxnake/swig
Could you please update wiki with your findings and specific release info that builds?
https://wiki.lazarus.freepascal.org/SWIG

But I don't know how to do it!

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Delphi SWIG
« Reply #3 on: March 31, 2020, 02:36:15 pm »
Could you please update wiki with your findings and specific release info that builds?
https://wiki.lazarus.freepascal.org/SWIG

But I don't know how to do it!
Basically you just login with your forum account, open mentioned wiki page, click the "Edit" page tab at the top of the page, make changes to the text, and click the "Save page" button.

Full instructions can be found here: https://www.mediawiki.org/wiki/Help:Editing_pages
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

guest65405

  • Guest
Re: Delphi SWIG
« Reply #4 on: April 01, 2020, 06:00:38 am »
Could you please update wiki with your findings and specific release info that builds?
https://wiki.lazarus.freepascal.org/SWIG

But I don't know how to do it!
Basically you just login with your forum account, open mentioned wiki page, click the "Edit" page tab at the top of the page, make changes to the text, and click the "Save page" button.

Full instructions can be found here: https://www.mediawiki.org/wiki/Help:Editing_pages

Your information is wrong. Forum account can't login into the wiki. We have to create a separate Wiki account.

p/s: I updated it as your request.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Delphi SWIG
« Reply #5 on: April 01, 2020, 09:27:06 am »
Your information is wrong. Forum account can't login into the wiki. We have to create a separate Wiki account.
Then I apologize for misleading information. It has been a while since I did that.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Delphi SWIG
« Reply #6 on: April 03, 2020, 10:56:36 am »
I updated it as your request.
Thank you!
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

guest65405

  • Guest
Re: Delphi SWIG
« Reply #7 on: April 04, 2020, 10:06:48 am »
I search the internet and came across this article: http://www.fmxexpress.com/create-wrapper-interfaces-for-c-and-c-libraries-using-swig-with-delphi-support/

However, the version from this repo didn't build: https://github.com/FMXExpress/swig-delphi

But the one from this repo did: https://github.com/lynxnake/swig

I didn't test if it works or not. But I just want to share it with you.

p/s: The last commit was from 2017, it seemed he abandoned it.

Update: Don't use this tool. It will not help anything but only worsen the problem. It generated binding is a mess and doesn't work. This tool need a paid professional working fully on it to be usable. But now, just don't use it. h2pas is still the preferred solution.

guest65405

  • Guest
Re: Delphi SWIG
« Reply #8 on: April 04, 2020, 10:36:59 am »
I updated the Wiki to reflect my experience but with more appropriate words.

Bogen85

  • Hero Member
  • *****
  • Posts: 595
Re: Delphi SWIG
« Reply #9 on: October 21, 2022, 04:36:03 pm »
https://github.com/neslib/Neslib.Clang and https://github.com/neslib/Chet

Chet depends on Neslib.Clang which uses libclang

Chet uses as GUI front-end, I've looked at the code, It seems like one should be able to strip out all the GUI stuff and make a decent command line flavor.

Those are for Delphi. The Delphi stuff would need to be converted to use only things from Free Pascal.

Thankfully project has a good license to allow for this (BSD) were the project to be forked to be Free Pascal and command line centric.


 

TinyPortal © 2005-2018