Initial Setup and adding mods(help)?

BlitzMax Forums/BlitzMax Beginners Area/Initial Setup and adding mods(help)?

Rick Nasher(Posted June) [#1]
Hi guys,

I wanted to have a 'quick' look at Krishan's OpenB3D Framework, so decided to download and install the OpenB3D Wrapper module, but apparently installing the modules isn't just a matter of dropping them in the mod directory, for when I'm trying to compile a OpenB3D example I'm getting the msg: "Compile error - Can't find interface for module openb3d.b3dglgraphics ".

Somewhere I read that I perhaps need run the (Re)Build Modules from the MaxIDE>Program menu, but these options are grayed out, or should use BMK, but it didn't have any effect. Besides that it's a bit unclear to me if these mods need to be in a specific mod subdirectory and if so, what this should be named.

I'm probably being stupid and overlooking things, but how come there isn't a step-by-step setup guide in the docs that states clearly how all this is supposed to be done?

My OS is Win10Prox64, I'm using the official BlitzMax & MiniGW which are located in their respective directories at C:\ and ENV vars for these are setup correctly. Standard BlitzMax code without the modules are compiling fine.


So quite a few questions I'm faced with now:
1) Do I need to assign some other env vars?
2) what is/are the names of the folders the mods are supposed to be in?
3) Bit confused here: I thought that MiniB3d and OpenB3d were 2 different graphics engines, but while searching the forums for instructions I found OpenB3D in the MiniB3d folder, so prehaps my view at this was a bit to simplistic?
4) I thought MiniGW was *only* required for compiling non-bmx code? Am I wrong?
5) I see in Yue's post "Instal MinGW?" steps that are completely different from the ones I followed which where base on earlier instructions I found in other threads.

Install it in BlitzMax\MinGW32 and use Brucey's BMK:

steps:
- install MinGW in C:\YourPathTo\BlitzMax\MinGW32
- Download bmk-master.zip from github.com/bmx-ng/bmk.git (click "download or clone")
- unzip bmk-archive
- open MaxIDE and open bmk.bmx there, compile "threaded"
- rename bmk.mt.exe to bmk.exe and copy bmk.exe + make.bmk + core.bmk to your "C:\YourPathTo\BlitzMax\bin" (overwrite existing bmk.exe)

- within MaxIDE do a "rebuild all modules" (or from commandline: "C:\YourPathTo\BlitzMax\bin\bmk.exe makemods -a")


When now compiling it tries to use the MinGW installed in BlitzMax. The "lib"-folder of the vanilla BlitzMax is then no longer needed.


bye
Ron


I see here references to "MiniGW32" and Brucey's BMK.
A) Does this mean BlitzMax/MiniGW32 is 32bit only?
B) Is it preferred to use Brucey's BMK and is this in effect the BlitzMax-NG being referenced to and is this compatible with XorS3D / OpenB3D or doesn't that make any difference?

Any help is much appreciated.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Edit/Update]
Meanwhile I followed steps in Yue's post "Instal MinGW?" to see what would happen.

I downloaded and unzipped the BlitzMax-NG archive "BlitzMaxNG_win32_Unoffical_0_77.7z" from http://www.bmx-ng.com/main/downloads/

It says it includes new MaxIDE and base mods; BRL, Pub, Sdl and MaxGUI,
but apparently already has MiniGW installed too.

I then just added the environment variables using:
1) rightclick on "Computer"(at desktop), select:Properties>Advanced system settings>Environment Variables.

2) under "User variables for [username]"

Click "New.."
Variable name: MinGW32
Variable value: C:\BlitzMaxNG_win32_Unoffical_0_77\MinGW32

Under "System variables"
Select "Path" in the list.
Click "Edit.." and then "New"
Add the line:
C:\BlitzMaxNG_win32_Unoffical_0_77\MinGW32\

3) downloaded & unzipped "bmk-master.zip from" https://github.com/bmx-ng/bmk
4) Loaded "bmk.bmx" into MaxIDE.

This now compiles but gives error in the end:
[ 99%] Compiling:bmk.bmx.gui.debug.mt.win32.x86.c
[100%] Linking:bmk.debug.mt.exe
g++.exe: error: unrecognized command line option '--stack=4194304'
g++.exe: error: unrecognized command line option '--subsystem,windows'
g++.exe: error: unrecognized command line option '-mthread'
Build Error: Failed to link D:/Install/Appz/Programming/Blitz/_BlitzMax/_Code, Libs & Mods/bmx-ng/bmk-master/bmk-master/bmk.debug.mt.exe
Process complete

I finally removed the env vars as they apparently weren't used in this version anyway, same results though.


TomToad(Posted June) [#2]
I posted a YouTube video a while ago on how to install MinGW and compile BlitzMAX from the GitHub source.
https://www.youtube.com/watch?v=9Xq3z2Vpbhc&t=7s

You might be able to just skip to the setting up of the environment variables (4:32 - 8:20), then check if you can Rebuild Modules.

Unfortunately, vanilla BlitzMAX requires that some of the files in the /lib folder be compatible with the version of MinGW that you use, often requiring you to copy things from the MinGW directory to the BlitzMAX directory (and it doesn't always work). If you use brucey's bmk.exe, then you can just plop MinGW into C:\BlitzMAX\MinGW32 and it will use MinGW's libs instead, avoiding compatibility issues and need to copy things. Or you can use the GitHub version which is a newer version of BlitzMAX and it will work without the need to copy libs. Or you could go the BMX-NG route.


markcw(Posted June) [#3]
I recommend using DruggedBunny's fork of Openb3d as the last commit of mine was a bit broken, there will be an update soon to fix this.

I also recommend using open source/OS Bmx (v 1.52) as it doesn't have this problem with the lib folder and is easier, as all you do is run a script to build bmk, etc. (which uses the version of MinGW you have active in your env vars).

1. See my MinGW guide that tells you you only need 2 env vars.
2. all module folders are in yourbmx/mod/yourmodscope.mod/yourmodule.mod
3. openb3d should exist in modscope openb3d.mod if anyone suggested using minib3d.mod that's bad advice
4. Yes, bmk compiles bmx code and MinGW compiles c/c++, when modules are built they don't need built again (unless you change them) so when you compile an executable it is fast
5. I recommend using TDM MinGW 5.1.0 64-bit as it also builds 32-bit, although Brucey does recommend 4.7.1
6. It is not MiniGW32 it is MinGW and yes, 32 means the 32-bit version only
7. Brucey built a version of bmk for vanilla/legacy bmx which is not related to bmx-ng, you don't need his bmk unless you want the features he added


Rick Nasher(Posted June) [#4]
Thanks for the replies above guys.
Strikes me as a bit bizarre that there's so much ado & confusion for just installing these. Time for some clear docs/explanations for the newbies/noobs.

Would be nice to have 2 clear step-by-step setups, 1 for vanilla BlitzMax and 1 for BlitzMax-NG, which also shows for each what add-ons are possible and how.

I'll give it a go after diner..