Creating your own BlitzMax Module


Tweet blitzmax blitzmax-ng tutorials
(Posted 8 months ago) RonTek

A quick tutorial on how to create or convert your existing code to a blitzmax module.

  1. Create a folder under mod with a custom namespace (ex. BlitzCoder.mod) for your module. You can add to existing ones if you feel like it.. ie contributing (see next steps regarding namespace).

  2. Create another folder under it with the name of your module like MyModule.mod and name your main bmx file the same as the folder like MyModule.bmx

  3. At the top of your main bmx file, copy and replace the below details with yours.. note the top namespace BlitzCoder first then the name of the module..

Module BlitzCoder.MyModule

ModuleInfo "Version: 1.10"
ModuleInfo "Author: Your Name Here"
ModuleInfo "License: zlib/libpng for example"
ModuleInfo "Copyright: Your Name Here"

ModuleInfo "History: 1.10"
ModuleInfo "History: New features for 1.10..."
ModuleInfo "History: more..."
ModuleInfo "History: 1.00"
ModuleInfo "History: Document your changes here"
ModuleInfo "History: more..."

Now you can just import your module from any blitzmax code/project

Import BlitzCoder.MyModule
(Posted 8 months ago) hardcoal commented:

Ill give it a shot

(Posted 8 months ago) hardcoal commented:

This didnt work..
I get error Can't find interface for module 'blitzcoder.mymodule'

I Did BlitzMax\mod\BlitzCoder.mod\MyModule.mod\MyModule.bmx

(Posted 8 months ago) RonTek commented:

It should work.. anyway already went ahead, just check out how it was setup

Reply To Topic (minimum 10 characters)

Please log in to reply