Interfacing with C(++)

BlitzMax Forums/BlitzMax Programming/Interfacing with C(++)

Otus(Posted 2008) [#1]
I know how to import a C(++) file and call the functions there from my BlitzMax code. Is the opposite possible - is there any way to call a BlitzMax function from C(++)?


DStastny(Posted 2008) [#2]
Yes. There a couple of approaches you can use.

1. Is to pass the function in as a function pointer.
2. Is more difficult to set up but you can convert the .i file to a .h file and call pass in blitzmax objects. Skid wrote a a kinda working tool that does mods to do this but, I have only done it by hand myself for a local project so cant say if it works. itoh

Doug Stastny


Brucey(Posted 2008) [#3]
itoh seems like a tad overkill to me, and 1 is only useful generally for callbacks.