Can't build module

BlitzMax Forums/BlitzMax Programming/Can't build module

Pineapple(Posted 2011) [#1]
I downloaded Brucey's Box2D module - http://www.blitzbasic.com/Community/posts.php?topic=78769

and I can't build it. I put the box2d.mod folder in C:\BlitzMax\mod\bah.mod\

I'm fairly certain I have MinGW installed and configured correctly; it doesn't stumble on compiling the source files.

The Build Modules option is grayed out (disabled) in the menu. Building box2d.bmx results in the error "Compile Error: Module does not match commandline module" The IDE highlights the line "Module BaH.Box2D" when it throws the error.




Last edited 2011


Gabriel(Posted 2011) [#2]
Open a command prompt and type "gcc" without the quotes. What message do you get?

EDIT: Additionally, you can't build modules by opening the source file and hitting compile. Well, you can, but in Blide, not in the standard IDE. The fact that the menu option is greyed out is not necessarily proof anything is wrong. This seems very finicky even if you have things set up right. To build a module from the command prompt, navigate to the BlitzMax bin folder (c:\program files\blitzmax\bin by default) and type "bmk makemods bah.box2d"

Then see if you get an error on that. But try the gcc thing first.

Last edited 2011


Pineapple(Posted 2011) [#3]
gcc: no input files

Excuse my inexperience with the prompt, but I don't know how to navigate to a folder.


ziggy(Posted 2011) [#4]
This message means that the module is not placed at the right folder.


Gabriel(Posted 2011) [#5]
This message means that the module is not placed at the right folder.

It's one of the reasons for that message, yes, but the folder he says he put it in sounds correct. It's also the message that MaxIDE gives when you try to compile a module by opening the bmx file, regardless of whether the module is in the right folder or not.

Perhaps if you can give us a screenshot of the folder in windows explorer showing the full path we can be sure it's right. Look out for capital letters and spaces, neither of which BlitzMax likes in its module names/paths.

With regard to navigating to the folder, with a command prompt open type:

"cd /program files/blitzmax/bin"

Or whatever the path is. cd simply means change directory and the full path just needs a slash in front of it so you go back to the root folder first.

Last edited 2011


SLotman(Posted 2011) [#6]

I'm fairly certain I have MinGW installed and configured correctly; it doesn't stumble on compiling the source files.

The Build Modules option is grayed out (disabled) in the menu.

If the "Build Modules" is grayed out - then there's something wrong with MingW installation.

You have to install MingW (better if on c:\mingw and not inside the program files folder) and set the system environment variables.

Check this thread on how to install MingW.

Only when the "build modules" option is active, you have everything correct.


Gabriel(Posted 2011) [#7]
Only when the "build modules" option is active, you have everything correct.

Not to be funny, but this isn't always true. I have *never* had the build modules option active, and I was able to build modules from the command line perfectly for years. Most of the time, I'm sure you're right. When the option is greyed out, it probably does mean that MinGW is not properly installed, but it's not an absolute, which is why I suggested testing from the command line to be certain.