Compiling a .dll from bmx code?

BlitzMax Forums/BlitzMax Programming/Compiling a .dll from bmx code?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You can only export Functions from a dll,

so more like this:
'DLL
Function GetData( output:Int Var)
  output = 10
EndFunction

'APP
Global data:Int
GetData( data)


or this:
'DLL
Function InitDll:Int()
  Return your_data
EndFunction

Function DoSomethingElse()
EndFunction

'APP
Global data:Int = InitDll()
DoSomeThingElse()