BlitzMax + DarkSDK?

BlitzMax Forums/BlitzMax Beginners Area/BlitzMax + DarkSDK?

flim(Posted 2006) [#1]
Does anyone tried using DarkSDK with BlitzMax?


Dreamora(Posted 2006) [#2]
Isn't DarkSDK .lib only? Without the sources you can't really use precompiled C++ stuff as you can't use the object straight away.


N(Posted 2006) [#3]
It's completely possible, however I have not yet raised the funds to get a copy of the SDK and try it.

You would just need to build a new import library for the SDK (easier than it sounds) and go from there.

If it uses classes, you may also have to write a C interface for them. I use the wx-c-gen script provided with wx.NET to generate the code for my wrappers, but usually it's not needed.


Dreamora(Posted 2006) [#4]
Is there an easy way to include .lib in GCC which needs .a?


JaviCervera(Posted 2006) [#5]
You would just need to build a new import library for the SDK (easier than it sounds) and go from there.
You would just need to do that if the DarkSDK was a dll, but it is a set of .lib files which only work for VC++. They planned to release a Dev-C++ (this is, GCC based) version, but I don't know if that will ever be done.

The only option to use DarkSDK right now on BlitzMax would be to create a .dll with all the .lib files, and the import the dll into BlitzMax. The problem is that I don't know if DarkSDK allows the distribution of the functions inside a Dll. AFAIK, you must statically link it into the EXE.


N(Posted 2006) [#6]
I couldn't find any clause in the license stating that you are not permitted to use it as a DLL. It should be possible as far as I can see.


JaviCervera(Posted 2006) [#7]
Perfect then.


Dreamora(Posted 2006) [#8]
E: No clause in the license that forbids you to export the DarkSDK functionality to the outer world? which would be needed to use it as DLL?
I would strongly assume that it is, as this would allow any costumer to your games/apps to create own ones just with the DLL if it would not be forbidden.


flim(Posted 2006) [#9]
That means I need to wait until TGC support Dev-C++


N(Posted 2006) [#10]
E: No clause in the license that forbids you to export the DarkSDK functionality to the outer world? which would be needed to use it as DLL?


Not that I could find.


Dreamora(Posted 2006) [#11]
In that case it would be nice ... :-)
although TGC has that restrictive licenses already on DBP that I would imagine that they put it in some strange formulation in so they could sue your ass if you tried to do a competing product (what means the same as giving out direct access to internal functionality)


N(Posted 2006) [#12]
That's what A) export definitions and B) writing your own engine on top of it is for.

Frankly, I don't think using it in BlitzMax is going to change a whole lot since you'll still have to play by C/C++'s rules when it comes to memory management.

If you really want to use something akin to the Dark SDK thinger, you're probably better off getting DarkBasic Pro now or just using C/C++ with it.