.dclrs

Blitz3D Forums/Blitz3D Programming/.dclrs

Neochrome(Posted 2004) [#1]
just a quickie
Im writing and i used some dlls for a game in blitz

Does the Blitz Compiler compile all the contents in the user libs?

if i dont use it, will it still be compiled?


Bot Builder(Posted 2004) [#2]
you have to include the dlls along with the exe, unless the dlls are often found in windows\system32 (like user32.dll).


AbbaRue(Posted 2004) [#3]
The Letters DLL stand for Dynamic Link Library.
A true DLL is Linked with a program when it is run.
No true DLL's are ever compiled with a program.


Neochrome(Posted 2004) [#4]
just the calling to the Lib, i guess then if i DONT use the lib that command wont be compiled to the main project?


BODYPRINT(Posted 2004) [#5]
I don't think it ever gets compiled INTO the actaul executable. The functions are just run as they are called.
That's why the dll needs to be distibuted with your program.


LAB[au](Posted 2004) [#6]
There is a software "The wrap" which packs everything in a single exe, then unpacks while executing, and clean/repacks when you exit the exe...

http://trondoc.ezwebtech.com/theWRAP/index.htm

Don't know if it works well...


VIP3R(Posted 2004) [#7]
@LAB[au]: Remember you can't pack any DLL's into the exe that requires them, they need to be already present before the exe starts up. Regarding packers, the Terabit packer by Lee Page works very well.


LAB[au](Posted 2004) [#8]
Well just look at this webpage, it claims to wrap dlls as well


Odds On(Posted 2004) [#9]
I think you guys have got the wrong idea about what Neomancer is asking. I'm pretty sure I read somewhere that only the userlib functions that are used by your application get compiled into the exe, the rest should be ignored.

You can probably test it by compiling a few times and removing/adding userlib files to see if the size of the exe changes each time.

Regards,
Chris


VIP3R(Posted 2004) [#10]

LAB[au]: look at this webpage, it claims to wrap dlls as well


Yes, 'the wrap' is capable of wrapping dll's and so is the Terabit packer. What I meant was if you wrap dll's into a single exe, the dll's must be present before execution of your program begins. With the Terabit packer, this isn't possible because the unpacking of the dll's doesn't occur until the program has already started. Looking closer I would suspect 'the wrap' may add its own unpacking sequence to the very beginning of the original exe (hence the name 'the wrap'). I couldn't find any more info about how this works from 'the wrap' website, but if that is what it does then it should work fine as you suggested ;)

Returning to Neomancer's original question, Blitz won't compile the contents of the dll, the exe will only call the dll functions during runtime, as Phil74 mentioned.

Also, if the program does not call any functions from a dll, it will not compile any reference to the dll in the final exe, as Falcon pointed out they will just be ignored. This should be the case even if the dll's decls userlib is loaded at the time of compiling.