Results 1 to 5 of 5

Thread: Mixing C++ and Delphi without wrappers

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Oh, I need to check irrdelphi then, I'm interested to see how they did it, probably same then!

    And yes, it compiles fine on latest FPC, I use it frequently to compile my games for all platforms except Windows (where I stil use the old Delphi 7).
    And soon I'm adding support for Oxygene and Pascal Studio, however that still requires some big refactoring of the engine to work around the diferences/limitations of those 2 compilers

    PS: Just checked irrdelphi, and it uses a different approach (more complete and complex). It seems to be able to emulate a c++ class in a more generic way, really interesting and clever, thanks for sharing!
    Last edited by Relfos; 07-07-2015 at 11:48 AM.
    www.pascalgameengine.com - Crossplatform 3D game engine

  2. #2
    I have seen that technique few weeks ago from this link:

    http://www.pascal-central.com/pasicu.html

    But i got lost from "Virtual Method Table Reconstruction" technique, so i give up and went to the old way to coding a C dll wrapper.

    I really wish to use C++ class into my delphi app, with not need to wrapp every property and methods first in the C source and then in the pascal side.


    Last edited by Bpascal; 07-07-2015 at 09:41 PM.

  3. #3
    Thanks for that link too, that is more about doing opposite though, calling C++ classes from Delphi, instead of letting C++ call Delphi code.
    Writing that kind of stuff manually for big APIs is lots of work though, ideally it should be done either via a preprocessing tool or even better, if someone could add direct support for that in FPC...
    www.pascalgameengine.com - Crossplatform 3D game engine

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •