Recent

Author Topic: SWIG C++ binding generator: found Delphi unit. Extend to FPC?  (Read 10431 times)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
SWIG C++ binding generator: found Delphi unit. Extend to FPC?
« on: October 19, 2012, 12:21:54 pm »
I've mentioned that Stefano Moratti created a Delphi module for SWIG, which generates object-oriented bindings out of C++ code:
http://stackoverflow.com/questions/2559995/create-an-instance-of-an-exported-c-class-from-delphi
Quote
I've written a SWIG module targetting ObjectPascal and I'm using it successfully in my own project. I've traslated GEOS, and GDAL/OGR library. I also have a branch in the SWIG repository, BUT I still have to complete the final steps to build all the test suites and to fixup the typemaps in order to have the module be accepted.

Someone would like to help?

I finally found a patch dating back to 2008:
https://sourceforge.net/tracker/?func=browse&group_id=1645&atid=301645
... perhaps that's the one Stefano meant.

Perhaps adapting this to current SWIG+FreePascal could be worthwile so you can get object-oriented bindings for C++ code...

Thanks,
Reinier
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: SWIG C++ binding generator: found Delphi unit. Extend to FPC?
« Reply #1 on: October 19, 2012, 12:28:35 pm »
SWIG development mailing list discussion on the module:
http://thread.gmane.org/gmane.comp.programming.swig.devel/18297
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
Re: SWIG C++ binding generator: found Delphi unit. Extend to FPC?
« Reply #2 on: November 26, 2012, 01:29:05 pm »
This is interesting - anyway I found what seems to be the exact patches in this link.

http://sourceforge.net/tracker/?func=detail&aid=2010931&group_id=1645&atid=301645
Lazarus 3.0/FPC 3.2.2

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: SWIG C++ binding generator: found Delphi unit. Extend to FPC?
« Reply #3 on: November 26, 2012, 01:43:01 pm »
@vcflists. Yep, found that too.

Meanwhile, d.l.i.w. ported the patches to a newer swig version with good results; see this thread:
http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg30422.html
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: SWIG C++ binding generator: found Delphi unit. Extend to FPC?
« Reply #4 on: July 19, 2013, 12:19:27 pm »
Created a wiki page to bundle all information:
http://wiki.lazarus.freepascal.org/SWIG
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified


avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: SWIG C++ binding generator: found Delphi unit. Extend to FPC?
« Reply #6 on: April 16, 2017, 01:42:32 pm »
An updated version is published here
I don't believe my eyes  :) :D :)
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

sarason

  • Jr. Member
  • **
  • Posts: 77
Re: SWIG C++ binding generator: found Delphi unit. Extend to FPC?
« Reply #7 on: October 15, 2017, 01:21:33 am »
I will have to say , what a great effort!
I tried to get SWIG operating a few years back but largely failed in my endeavours. It is good to see some success at a problem which I know from personal experience could not have been easy!

regards sarason

 

TinyPortal © 2005-2018