Pascal External SDK? -- Now Available
Posted: Mon Jul 05, 2010 4:11 am
Would anyone like to write externals in Pascal or a cross-platform Delphi variant? The standard recipe for externals is currently C or C++ only. And an external can be written in another language and then a thin C/C++ "wrapper" written to access it, but can it be done natively using Pascal only? We don't yet know the answer to that question. In theory it is possible, but in practice will name mangling or other linking issues make it impossible to achieve?
On the RunRevPlanet home page there is a poll that could result in a new free resource – so if you are interested, please visit and vote.
If there is interest I will attempt it, and if successful the resulting External SDK based on the cross-platform Lazarus/Free Pascal tool will be released as a free resource for the Revolution community.
I like coding in Pascal and so being able to make externals with it sounds cool, but such a project won't happen if no-one else would be interested in using it. Feedback here, or doing the poll at RunRevPlanet will be helpful. Thanks.
---------- UPDATE ----------
I now have a recipe for getting the Free Pascal Compiler to generate dynamic libraries that are compatible with LiveCode Externals. The hardest part of the process was translating 2 files (external.c and eternal.h) from the existing C based Externals Library to the Pascal language. Getting the right combination of "var" parameters and the direct passing of data structures vs passing pointers to data structures in the Pascal code was an interesting process. Then there was the issue of getting the getXtable export to be recognised by LiveCode.
The successful recipe is complete, and works on Linux, Mac and Windows. It is now bundled up as the RunRevPlanet Pascal SDK which you can get from:
http://www.runrevplanet.com/free-downloads.html
On the RunRevPlanet home page there is a poll that could result in a new free resource – so if you are interested, please visit and vote.
If there is interest I will attempt it, and if successful the resulting External SDK based on the cross-platform Lazarus/Free Pascal tool will be released as a free resource for the Revolution community.
I like coding in Pascal and so being able to make externals with it sounds cool, but such a project won't happen if no-one else would be interested in using it. Feedback here, or doing the poll at RunRevPlanet will be helpful. Thanks.
---------- UPDATE ----------
I now have a recipe for getting the Free Pascal Compiler to generate dynamic libraries that are compatible with LiveCode Externals. The hardest part of the process was translating 2 files (external.c and eternal.h) from the existing C based Externals Library to the Pascal language. Getting the right combination of "var" parameters and the direct passing of data structures vs passing pointers to data structures in the Pascal code was an interesting process. Then there was the issue of getting the getXtable export to be recognised by LiveCode.
The successful recipe is complete, and works on Linux, Mac and Windows. It is now bundled up as the RunRevPlanet Pascal SDK which you can get from:
http://www.runrevplanet.com/free-downloads.html