There is a way to create plugins for AppGameKit in PureBASIC ?
Quote: "Building a DLL
PureBasic allows to create standard Microsoft Windows DLL (Dynamic Linked Library), shared objects (.so) on Linux, and dynamic libraries (.dylib) on MacOS X. The DLL code is like a PureBasic code excepts than no real code should be written outside of procedure.
When writing a DLL, all the code is done inside procedures. When a procedure should be public (ie: accessible by third programs which will use the DLL), the keyword ProcedureDLL (or ProcedureCDLL if the procedure needs to be in 'CDecl' format, which is not the case of regular Windows DLL) is used instead of Procedure (and DeclareDLL or DeclareCDLL if are used instead of Declare). This is the only change to do to a program.
When this is done, select 'Shared DLL' as output format ('Compiler Option' window in the PureBasic editor or /DLL switch in command line) and a DLL with the name you set (in the save-requester when using the IDE) will be created in the selected directory.
Example
ProcedureDLL MyFunction()
MessageRequester("Hello", "This is a PureBasic DLL !", 0)
EndProcedure
; Now the client program, which use the DLL
;
If OpenLibrary(0, "PureBasic.dll")
CallFunction(0, "MyFunction")
CloseLibrary(0)
EndIf
For advanced p"
You can create a DLL in PureBASIC, but on AppGameKit they ask to write the text DLL_EXPORT before the function, but in PureBASIC I get an error, obviously...
Quote: "Any functions that you create in the plugin that you want to be accessible to AppGameKit must start with the text DLL_EXPORT like so
DLL_EXPORT void SetI( int value )
{
i = value;
}
"
Thanks for the help.