Alternate approach – Dynamic Link Libraries with Free Pascal and VASmalltalk

Dynamic Link Libraries are written in C – that’s it. No question about that. On the other hand I always find it difficult and time consuming to write one. Lots of code has to be typed in – just to make a dynamic library.

After some years I took a look at FreePascal (remember that language …) again to see, how far they are and I was sursprised to see, how well they did their job (also looking at Lazarus).

But writing a dynamic link library is pretty easy to do – and it should be portable between Windows and Linux (though I did not try Linux here).

FreePascal is a simple Turbo-Pascal looking tool and creating a library is very simple:


And to verify we look at the exported functions:


And how do we access this function from VASmalltalk:


and the result looks like:


That’s it. I just wanted to show, how easy a creation of a dynamic link library is and it may be a good idea to consider this language as an alternative to “C” for jobs like this.

This entry was posted in Smalltalk and tagged , , . Bookmark the permalink.