Blitz dll's
BlitzPlus Forums/BlitzPlus Programming/Blitz dll's
| ||
I know that the normal dll's in the userlib directory are written in C. But say there are a few functions I use in my blitz programs, MakeWindow() for instance, is there any way I can just write a dll in normal Blitz language, and be able to use MakeWindow() in other programs with out haveing to make the whole Function MakeWindow() ... End Function ? If you dont get what im asking, just say so. any help is appreciated. |
| ||
Use the Include command. |
| ||
Is there away to do it without include? So that it's just as if it was built into blitz and i could go "MakeWindow()" in the same way as i say "Print "Hello World"" without writting the whole function? |
| ||
you can't write dll's using Blitz, the only way to do this is with an include, or you create a dll in another language. |
| ||
oh well thats too bad. i got this function i use in like every program. i hope its not to hard to convert it to C |
| ||
is there a reason you don't want to use it in an include? |
| ||
So that i dont have to have an extra file hanging around, and it saves an extra line of code. I know, im obsessed with bumming my code. |
| ||
A global includes folder would be very handy. include "tokens.bh" (blitz-header) rather than: include "../../../? how many folders up was it.../includes/tokens.bh" |
| ||
Whatever. I'll just have to do it the hard way. If anyone figures it out, give me a buzz. |
| ||
the best thing about DLL's is that you don't have to recompile the contents in the DLL...if you have big includes, compiling takes longer. With DLL's you dont have that problem |
| ||
Exactly, thats why i want to use a dll, not an include. |
| ||
includes also have advantages though -- and include becomes an actual part of the compiled program itself, without the need of an additional (dll) file to be present. |
| ||
A global includes folder would be very handy. If only we had a preprocessor which would do just that! :) |