Qbasicnews.com

Full Version: When you compile the code with BC.EXE...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
...is it relevant how big the library you used is(I mean in the sense of memory consumption) or does the memory consumption in the compiling process only depends on library's subs/functions you declared in the main module or in a bi file?

And I'm talking about compiling outside QB IDE.

Also, does the size of library influence on QB IDE functioning? I mean, is huge library making it difficult to code in QB IDE not depending on the library subs you desided to declare?
When you make a lib up, always remove from it the subs/functions you're not going to use. RelLib 5.0 is way to big for the IDE, but if you remove everything but what you want (drawing primatives, sprite handling, XMS), it's more easy to handle.
A library is a collection of functions, when you link your program with a library each of the functions will be included in the text segment of the resulting executable which increases its size. I dont know if QB's linker will link in all of the functions in a library or just all of the ones that are called
After running BC.exe you then run LINK which will only include those functions or subs which you declared or used in your program. Therefore, the actual size of the library does not matter to LINK. BC does not know which library you're using, only LINK does.
*****
Inside the IDE, yes its makes a big difference but outside-IDE compiling, it does not matter.

BTW, Plasma357 made a better solution to outside compiling when he made qb4med. ;*)

Combines libs, nide IDE, lost my copy. ;*(
I still have it Smile I first have to find out how to upload files > 1 meg...
From what I understand, I always thought that it doesnt only include subs/functions, but it does exclude obj files it doesnt need, hence why a "hello world" qb program can be huge while the same program in C is 4k. But I'm wrong all the time so dont take that as law.
Librairies are made of modules. When a sub/function in a module is needed, the whole module is linked. The unused modules are left apart.
Thanks for the confirmation Smile
Quote:From what I understand, I always thought that it doesnt only include subs/functions, but it does exclude obj files it doesnt need, hence why a "hello world" qb program can be huge while the same program in C is 4k. But I'm wrong all the time so dont take that as law.

Only if your lib's procedures are buched in modules.

Rellib for the most part of it has:

1 OBJ=1 procedure.

Did you ever noticed that Rellib had the smallest exe in blitz's bechmark tests a while ago? ;*)