Module Interface Errors
BlitzMax Forums/BlitzMax Beginners Area/Module Interface Errors
| ||
Okay, so I've been using BlitzMax for a few years and I STILL don't understand what causes BlitzMax to give me the error "Cannot find interface for module <module_name_here>". I made a module a few days ago and it worked the first time I put it in the "mod" folder, then I made another module in the EXACT same way, but when I try to use the Import command, I get the interface missing error. How do I fix this? |
| ||
Well, first off, let's see the path to your module folder and code. Secondly, what does the header of the main module source look like (Module, ModuleInfo, Imports, etc.)? |
| ||
First bit of info, the modules are on my MacBook Pro, not sure if that makes a huge difference, but it probably does. Module path: ~/BlitzMax/mod/coolstuff.mod/CoolColors.mod/ Testing code path: ~/Blitz Projects/CoolColors Test/Test.bmx Module's Header: ' CoolColors.bmx Rem bbdoc: End Rem Module CoolStuff.CoolColors ModuleInfo "Blah" Import BRL.Max2D ' Module starts |
| ||
And have you compiled the module (MaxIDE, Program -> Build Modules)? |
| ||
Yes, and it compiles with no errors at all. |
| ||
OK. I've never run into this before, because I always use lowercase paths. Something in the BlitzMax utils doesn't like the case of the module path (interface files are not being generated). To fix this, lowercase the path to the module and the main source (~/BlitzMax/mod/coolstuff.mod/coolcolors.mod/coolcolors.bmx). EDIT: Quote from the docs: Modscope should be a unique name (for example, the name of your organization or company) and is used to group together modules provided by a common source. Both modscope and modname should be valid identifiers. Also, to prevent issues with case sensitive filesystems such as Linux's, it is recommended that modscope and modname be lowercase. So it is not a requirement, but obviously one of the utils lowercases the path when it tries to write certain files (and does not create the entire path beforehand). It should be suggested to make it a requirement for path names to be lowercase for modules. |
| ||
It should also be clarified which operating systems are case sensitive, such as Linux based operating systems like Ubuntu and it's family, Mac OS, Red Hat, etc. EDIT: Changing the mod scope and name and the bmx file to lowercase seemed to worked. |
| ||
It should also be clarified which operating systems are case sensitive, such as Linux based operating systems like Ubuntu and it's family, Mac OS, Red Hat, etc. Unix-based operating systems are case-sensitive, Windows is not. I do not see why this information should be in a programming language's documentation.The developer should know how his/her operating system works. |