Semaphores & Mutexes for Blitz3D

Blitz3D Forums/Blitz3D Programming/Semaphores & Mutexes for Blitz3D

virtlands(Posted 2013) [#1]
Well, I had some great DLL code working
that allows Blitz3D to access semaphores and mutexes,
but recently discovered that I can't distribute that 'wrapper' code,
because it's against the PureBasic license agreement.

So, I shall eventually try some other exotic programming language that
allows DLL creations.

Visual Studio Express, anyone ?


GaryV(Posted 2013) [#2]
The PureBasic license forbids you from creating DLLs that use PureBasic libraries to fill in missing functionality for other programming languages. You can use such DLLs for your own personal use, but you cannot share such DLLs with others.


virtlands(Posted 2013) [#3]
I didn't know that.
I've taken down the topic.


GaryV(Posted 2013) [#4]
So, if a person creates a finished product, (including DLLs) then
how in the world does that person distribute that program, if it's not allowed to share the DLL?


You can use such DLLs for your own personal use, This includes any program you write. Your own program can use any DLLs you write. You just can't provide those DLLs for others.

PowerBASIC has similar restrictions. IIRC, BlitzMax at one time had something similar for creating DLLs.

MiniBasic did not have that restriction, but the product is not available anymore because the author is in prison for child molesting.

Perhaps FreeBASIC or HotBASIC, or one of the many free C/C++ variants would suit your needs?


*edit* Although it is Windows only, I am quite fond of Pelles C

http://www.smorgasbordet.com/pellesc/


Yasha(Posted 2013) [#5]
Does anyone know of freely licensed software that allows shared DLLs to
be distributed ?


...pretty much every compiler other than PureBasic? That doesn't impress me with them too much. It is not at all normal for a compiler to limit what you can do with the produced software, to the point where normally that fact alone would be a complete product-killer, as that kind of tight and non-standard licensing is usually unusable in the real world.

I don't know any BASIC compilers outside of Blitz, but you could always treat this as an opportunity to learn some basic C. If you're mostly wrapping OS functions, what you write is unlikely to be significantly different from language to language anyway. EDIT: actually GaryV's ninja post reminded me of it; let me second FreeBasic, it's a good tool.


virtlands(Posted 2013) [#6]
I guess I can go "whole hog" and learn Visual Studio Express;
and use that to make custom DLLs.

I already have Visual Studio Express 2010 for C# installed.
It's a lot more complicated than BlitzMax and Blitz3D. :)

I'll also look into FreeBASIC, HotBASIC, and Pelles C.


Yasha(Posted 2013) [#7]
Dude you don't need Visual Studio, it's grossly overcomplicated and produces... weird messy stuff that's difficult to integrate properly with other tools.

If you don't have MinGW (which is the only "professional" C compiler on Windows), just grab TCC, which supports ISO standard C: http://bellard.org/tcc/

...and Geany as editor: http://www.geany.org/

...and you have a complete C dev environment in only a couple of megabytes of download (you'll need to add TCC to your PATH and change some Geany settings, but it works just like B3D does when sorted).

I guess Pelles C might be similar to a prepackaged version of this; I haven't tried it. Visual Studio is more or less useless for C programming, and doesn't even support the standard version of the language.


virtlands(Posted 2013) [#8]
...it's grossly overcomplicated and produces... weird messy stuff that's difficult to integrate properly with other tools...
Visual Studio is more or less useless for C programming, and doesn't even support the standard version of the language.

Well, that convinced me. Thanks for the nice advice on the other stuff too.

I already have those installed, {TCC, Geanie,...},
as well as the entire Visual Studio 10.0 Suite of programs: C#,C++, Basic.

Shall have to take some time to learn them.

I have about 20 different Pythons installed, and about 40 different 'Basics'.