Can't rebuild Modules !!!

BlitzMax Forums/BlitzMax Programming/Can't rebuild Modules !!!

Twinprogrammer(Posted 2012) [#1]
Hello ,

I'm trying to rebuild my modules so that I can use the mods i've downloaded , but Blitz Max won't let me ! How can I fix this problem ?

Twinprogrammer


col(Posted 2012) [#2]
What error messages are you getting?


xlsior(Posted 2012) [#3]
Windows, Mac, or Linux?

Windows: Did you install & configure the correct version of MinGW?
Mac: Did you install the latest xcode?
Linux: Did you install the plethora of dependency libraries?


Twinprogrammer(Posted 2012) [#4]
@Col: No messages , Blitz Max just won't let me rebuild modules.
@xlsior: Windows and trying to get miniB3d , D3d11Max2dDriver.

Twinprogrammer


GfK(Posted 2012) [#5]
Installed MinGW?


col(Posted 2012) [#6]

No messages , Blitz Max just won't let me rebuild modules.



The option is greyed out ? If so you need to do as Gfk suggests.

Grab a copy from here and follow the install guide to the letter and it should work out ok... http://www.blitzbasic.com/Community/posts.php?topic=90964

Last edited 2012


Twinprogrammer(Posted 2012) [#7]
Isn't there another way to just simply un-gray the rebuild modules button ? I don't understand what that forum link was saying ( I'm a newb at modules... ) .

Twinprogrammer


xlsior(Posted 2012) [#8]
Isn't there another way to just simply un-gray the rebuild modules button ? I don't understand what that forum link was saying ( I'm a newb at modules... ) .


No:

- Most of these external modules contain C code.
- To compile this code, you need a C compiler
- MinGW is a C compiler
- The IDE looks on your machine if MinGW is installed properly. If it is, it will un-grey the 'rebuild modules' link
- Blitzmax will then feed the necessary module bits to MinGW, and can use the resulting compiled C code from your blitzmax programs.

Without MinGW, there is no way to translate the module to a format that Blitzmax can actually use.


col(Posted 2012) [#9]
You will need it I'm afraid. Its not as difficult as may first think and you only need to do install it once. The tutorial in the link is how I got things setup. I followed it to the letter as I was a little unsure the first time I installed it too.


xlsior(Posted 2012) [#10]
anyway, the short version to get MinGW working:

- Download Nuen MinGW. (Original page is currently down, but you can download it here: http://www.xlsior.org/temp/mingw-7.2.exe

- Install to c:\mingw

- If it asks you what components to install, pick "C++ compiler" and "MinGW Developer Toolkit".

- Set a windows environment variable: MINGW=c:\MinGW
- Add c:\mingw\bin to your PATH environment variable
- Reboot your computer

This should un-grey out the rebuild module options for you.

If you're still having probs, you may also need to add these environment variables:
C_INCLUDE_PATH >> C:\MinGW\include;C:\MinGW\lib\gcc\mingw32\4.5.0\include
CPLUS_INCLUDE_PATH >> C:\MinGW\include;C:\MinGW\lib\gcc\mingw32\4.5.0\include



Twinprogrammer(Posted 2012) [#11]
It's asking where to extract to. Can I just choose a location (C:\) or do I have to put it somewhere specific ?

EDIT: I extracted it in C:\

Last edited 2012


Twinprogrammer(Posted 2012) [#12]
@xlsior

Okay , I downloaded it then did what GFK In the forum link did , and it worked ! The only problem was that I couldn't get anything to Run ! ( not even a simple Print "Hello , World" ) I would just get a bunch of 'failed to link C:\BlitzMax\Mods\Pub.Mod\ all of the files'. So I reinstalled BlitzMax , Redownloaded MinGW But haven't added the variables. So I'm probably gonna have to use those extra codes that you showed me.

Some questions from the extra code you showed...

Do I put it in user or system variables ?
Do I have to put a semi-colon between each line ?

Twinprogrammer

Last edited 2012


Twinprogrammer(Posted 2012) [#13]
It Works ! I added the extra bits of code and put it in the environment variables. It works now ! Thanks for your help.


Twinprogrammer


xlsior(Posted 2012) [#14]
You're welcome.

Setting up mingw can be a pain in the rear sometimes since it doesn't always seem to behave the same on all computers. Good to hear you got it working.