Shared Libraries?

BlitzMax Forums/BlitzMax Programming/Shared Libraries?

Hi,

This is possible...but it's a little more complex than it sounds.

The easiest case would be to generate dlls that expose a 'C' interface - this could be done right now with minimal tweaking of BMK.

However, you'd need to keep this in mind while developing - ie: your interface functions wouldn't be able to use Max objects - only C compatible constructs. For example, a function that required a string would need to expose a 'Byte ptr' parameter and internally use String.FromCString() to generate a Blitz string.

Where it gets tricky is if you want to write Max dlls for Max apps, which I imagine would be the more common case(?). There are many subtle issues here, especially if you want to make it 'seamless' which would be my goal if I attempted it.