Complete newbee question about modules
BlitzMax Forums/BlitzMax Beginners Area/Complete newbee question about modules
| ||
Hi, I wondered if someone can enlighten me with regard to modules. I understand that BMax is constructed from modules, and I understand that you can create your own. What exactly is the purpose of creating your own modules aside from being able to share them with others? If I have a specific set of functions relating to an area of code (ie sound ) is there an advantage to me building a sound module as opposed to just including/importing a sound.bmx? Are modules essentially bmx version of DLL's? Thanks |
| ||
You can just include a sound.bmx to do the same thing. But I'm not sure, maybe modules give you the ability to make your new commands show up hilighted as real commands? Plus documentation being included? |
| ||
ok thanks. Can anyone else help me out or point me in the right direction? Thanks |
| ||
Points: - Automatic documentation creation if the BBDOC is followed - Inclusion using a single line from anywhere, no need to copy it over again and again - You can share modules, WITHOUT sharing its sources! (its enough if you give the .a and .i, no need for the .bmx) Great if you do not want to share your sources |
| ||
I understand, so BMax modules as essentially just DLL's? I'll search the forums for ways on how to create modules. THanks! |
| ||
Not dlls but .a which is the GCCs equivalent to .lib ie static libraries (while dlls are dynamic libraries). while dll remain as their own file next to the exe or in system32, .a / .lib are linked into the exe and become a part of it. |
| ||
Great - thanks for taking the time to explain that. Cheers |
| ||
Yah a dynamic linked library is not the same thing as including a piece of sourcecode. |