Info on BlitzMax SDK

BlitzMax Forums/BlitzMax Beginners Area/Info on BlitzMax SDK

TwoCorin517(Posted 2007) [#1]
Hey I've been programming in BlitzMax for 1 year and a day today, but just registered, and got into Max GUI. I was a member of the old www.christiancoders.com which is now talk.Christiandevolopers.com.

To get on with it, I'm considering how easy it would be to interface with a C++ Project programming in BlitzMax. In order to Sync BlitzMax with C++ does the project have to be natively BlitzMax with C++ being filled in, or can it be C++ with BlitzMax filled in.

Are there any tutorials or help on this topic?

I had this in the Programming but realized this was more suited for the beginners.


Dreamora(Posted 2007) [#2]
BM is no SDK.
It is an own language, which allows you to import C and C++ in your BM code.

Documentation on that can be found in the help *press F1 in the IDE and then advanced topics*


TwoCorin517(Posted 2007) [#3]
I understand it is its own language, and that it allows you to import C, and I know where the help files are. I just want to know can BlitzMax interface with C++, like the B3d SDK can.


Dreamora(Posted 2007) [#4]
No you can not use BM within C++, only C++ within BM


TwoCorin517(Posted 2007) [#5]
Ah. Ok.


Who was John Galt?(Posted 2007) [#6]
If you have a substantial project coded in C++ I would say stick with that. Interfacing with C or C++ can be a bit of a headache with Max, although totally possible, it may be more effort than it is worth.


Ion(Posted 2008) [#7]
It's very possible since I've managed to do it myself by wrapping up the routines to an unmanaged dll.
It's NOT legal (or fair for that matter) to release the resulting PE however, so I can't (or won't) do that.

From the Blitz Shared Source Code License:
"...You may distribute executable applications built from
this source code under your own licensing terms. You may
not distribute static or dynamic library files based in
whole or in part on this source code..."

There are plenty of tutorials about linking a dll on the forums if you want to try it yourself.


Ion(Posted 2008) [#8]
Just to avoid anyone getting ideas...
I used the library in a c# project for personal use only and never released it and/or the source code.


plash(Posted 2008) [#9]
...You may distribute executable applications built from
this source code under your own licensing terms. You may
not distribute static or dynamic library files based in
whole or in part on this source code...
Is this license for BlitzMax itself? (shouldn't be) or for some code from the archives that are immediately declared public domain under the BSSCL, that you used in the DLL?

Summary: I wonder why you cant distribute static/dll files from that license.


Gabriel(Posted 2008) [#10]
Is this license for BlitzMax itself?

All the BRL modules, I think.

Summary: I wonder why you cant distribute static/dll files from that license.

To stop people wrapping all of BRL's modules into a library, and making the whole thing available wholesale without BRL earning a cent. As happened with that other Basic ( I forget the name ) which has been discussed a few times in General Discussion.


plash(Posted 2008) [#11]
Ah that makes sense, I didn't consider the brl modules when I posted that.. :)


Ion(Posted 2008) [#12]
The licence itself is a bit fuzzy as it refers to "this source code". What source code are they really reffering to?
Is it illegal to release a library built from my own BMax source or are they reffering to the sources that comes with the modules?
If it's the first case, are you not allowed to release libraries at all? If so, it's very strange that bmk comes with an option to make a library in the first place.
You don't actually have to make any tools to link the library, they are already provided by BRL...


Yahfree(Posted 2008) [#13]
pretty sure they mean the blitzmax official source code, IE, everything within pub and brl mod folders.


You should contact BRL support for further info, don't take my word for it


Dreamora(Posted 2008) [#14]
You are not allowed to create DLL, SO, Dylib without a special license from BRL, only applications.

If you create a module its no problem, modules do not import anything from other modules, they dynamically link to them when you compile it into an executable. This means if your module has import brl.map and the target user has that module not present yours won't work as well.