While learning C# and Delphi Prism for use with monotouch is rewarding, I am looking for a way to re-use code written in ordinary Object Pascal. To simply re-write everything I have done in Delphi over 15 years is simply unacceptable.
So my question is twofold:
- If I for sake of argument have a library written in ordinary Object Pascal with no external dependencies and compiled with the ARM freepascal compiler for iPhone - could I use the resulting dylib from monotouch?
- If the above is correct, how do I declare and call these external functions from C#/Prism? How do i deal with passing record types etc. in mono?
I have noticed that other iPhone applications ship with their own dylib files (the SDL game library is a typical example). I find no reason why this should not work.