Page 1 of 1

IncludeLibrary / IncludeResident

Posted: Mon Jul 10, 2006 10:05 pm
by Flype
IncludeLibrary "filename.pbi"

Like the IncludeFile / XIncludeFile command but,

- only the ProcedureDLL are recognized from the caller source.
- same rules/behaviour as the 'Windows DLL' compiler directive.



IncludeResident "filename.pbi"

- Same but for including only the Constants and Macros.



This might be useful for making 'cleaner' includes, wrappers and such.
:roll: :?:

Posted: Mon Jul 10, 2006 10:07 pm
by Flype
or maybe - in a different way :

IncludeLibrary "filename.lib"
IncludeResident "filename.res"

Posted: Tue Jul 11, 2006 12:25 pm
by inc.
Honestly, imho the res files do got their purpose to be auto loaded when starting PB. But your purpose is to include them individually projectbased.
So a common include file containing Structures/Constants etc. could be/is enough?
IncludeLibrary "filename.lib"

Thats already the job of "Import/EndImport" which works ok - well if all which has to be linked also is present ;)


Quintessence: I think you cant wait (me also) for a final official release of Tailbite supporting v4 ? ;)

Posted: Tue Jul 11, 2006 1:04 pm
by Flype
hum, forget the second post... that's not useful at all.
inc. wrote:Quintessence: I think you cant wait (me also) for a final official release of Tailbite supporting v4 ? ;)
:cry: yesssss. :D

Posted: Sat Jul 15, 2006 5:14 am
by Amiga5k
Resource files can already be included on a per-project basis via compiler options, no?

From the manual:
"Resources

Here you can include as many Resource scripts (*.rc files) as you want. They will be compiled and included with the executable. You can use any resource editor (for example the PellesC IDE) to create such scripts.

Note: Since Resources are a specific to the Windows platform only, PB does not include a Library to manage them and they are not further documented here. See documentation on the Windows API and resources for more information."
Import/EndImport works with .lib files, but I'm not sure if they statically linked or not. (Wish they were!)

Russell

Posted: Sat Jul 15, 2006 7:32 am
by ts-soft
Amiga5k wrote: Import/EndImport works with .lib files, but I'm not sure if they statically linked or not. (Wish they were!)

Russell
You can use ResourceScripts *.rc in Compileroptions.
You can use compiled Resources *.res with Import, also *lib, *.obj
This is statically linked to your executable or dll

Re: IncludeLibrary / IncludeResident

Posted: Sat Jul 15, 2006 2:32 pm
by Dummy
Flype wrote:IncludeLibrary "filename.pbi"

Like the IncludeFile / XIncludeFile command but,

- only the ProcedureDLL are recognized from the caller source.
- same rules/behaviour as the 'Windows DLL' compiler directive.



IncludeResident "filename.pbi"

- Same but for including only the Constants and Macros.



This might be useful for making 'cleaner' includes, wrappers and such.
:roll: :?:
this idea is great and I'd love to have these features in PB ^^

Posted: Thu Jul 20, 2006 3:41 am
by Amiga5k
Ah, that's good to know!

Thanks!

Russell