Problems compiling modules

BlitzMax Forums/BlitzMax Beginners Area/Problems compiling modules

ahobbit(Posted 2006) [#1]
I'm getting the following error trying to compile a module:

Compile Error: Module does not match commandline module

The .bmx file being compiled is located two folders deep under the \BlitzMax\mod\ directory, as per the BlitzMax Help file (i.e. \mymod.mod\myprog.mod\myprog.bmx).

Inside the source file I have the command at the top (after a 'SuperStrict' command) as follows:

module mymod.myprog

Any ideas why I'm getting this error?


Dreamora(Posted 2006) [#2]
Are this the used names?

Because there are a few potential problems:

1. No empty spaces
2. Case sensitivity (on all beside windows and this holds for the filenames as well as module command)


TomToad(Posted 2006) [#3]
Are you compiling them by selecting "Build Modules" from the "Program" menu? I get that error when I accidentally try to compile it by clicking on the rocket instead of choosing "Build Modules"


ahobbit(Posted 2006) [#4]
I got the module to compile, and after searching around the forums for awhile I found a quirky fix:

Comment out the line with the Module command in it before compiling or you will get a "Module does not match commandline module" error.

After compiling, uncomment the Module command and run bmk with the makemods option.

BlitzMax should be smart enough to know what to do with the Module command for a standard compile without having to comment it out.


TomToad(Posted 2006) [#5]
You can't compile a module through the standard BlitzMax compile. You need to use "Build Modules" from the IDE menu or "bmk makemods" from the command line.
What you've basically done by commenting the Module command is compile the program as a standard binary (.exe) file, then when you uncommented the Module command and used makemods, you just recompiled the module over again correctly. You can eliminate the first step completely.