I know waht mean Interfaces in PB, but please:
What mean CVS? and residents?
CVS ?, residents ?
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
CVS = Concurrent Versions System (more info on www.cvshome.org)
Residents (folder .\PureBasic\Residents) contain (in compiled form) definitions like constants, structures and interfaces.
cu, helpy
Residents (folder .\PureBasic\Residents) contain (in compiled form) definitions like constants, structures and interfaces.
cu, helpy
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Hi all,
I have read what I can find on Residents and still don't really understand the why and wherefor of them.
Could somebody explain (in a simple way understandable by a simple mind) what these do, their benefits and etc.
And a maybe-maybeNot-related Q - Do libraries have an industry standard format. For eg, could a PB library work with masm, or vice versa?
Thanks.
I have read what I can find on Residents and still don't really understand the why and wherefor of them.
Could somebody explain (in a simple way understandable by a simple mind) what these do, their benefits and etc.
And a maybe-maybeNot-related Q - Do libraries have an industry standard format. For eg, could a PB library work with masm, or vice versa?
Thanks.
This is a PB specific thing. A .res file (found in the Residents folder of PB)
contains definitions of constants, structures or interfaces. The compiler reads
those, and automatically knows all the structures/constants/interfaces, that
are in there, without the need to write them in your code.
Kind of like a C header file that always get's included.
For example, there is the PureBasic_x86.res . It contains all of PB's own
constants. Remove it, and it won't recognize any of the flags for the commands.
There is also one for the WinAPI stuff, and for win32 interfaces and DirectX interfaces.
You can create your own .res file, if you have often used constants for example,
that you don't want to type all the time.
Just create a normal .pb file with them, and run the commandline compiler
like this:
pbcompiler.exe source.pb /RESIDENT residentfile.res
then, move the created .res file to the residents folder, restart PB, and
the compiler should know all your stuff.
About the libraries:
The files follow no standart. You can only use them with PB.
If you have a library in *.obj or *.lib format, you can turn it into a PB
library with the LibraryMaker tool (in LibrarySDK folder), but only if it's
functions are named properly (PB_ prefix for the functions). See the
LibrarySDK for more details.
Timo
contains definitions of constants, structures or interfaces. The compiler reads
those, and automatically knows all the structures/constants/interfaces, that
are in there, without the need to write them in your code.
Kind of like a C header file that always get's included.
For example, there is the PureBasic_x86.res . It contains all of PB's own
constants. Remove it, and it won't recognize any of the flags for the commands.
There is also one for the WinAPI stuff, and for win32 interfaces and DirectX interfaces.
You can create your own .res file, if you have often used constants for example,
that you don't want to type all the time.
Just create a normal .pb file with them, and run the commandline compiler
like this:
pbcompiler.exe source.pb /RESIDENT residentfile.res
then, move the created .res file to the residents folder, restart PB, and
the compiler should know all your stuff.
About the libraries:
The files follow no standart. You can only use them with PB.
If you have a library in *.obj or *.lib format, you can turn it into a PB
library with the LibraryMaker tool (in LibrarySDK folder), but only if it's
functions are named properly (PB_ prefix for the functions). See the
LibrarySDK for more details.
Timo
quidquid Latine dictum sit altum videtur
> pbcompiler.exe source.pb /RESIDENT residentfile.res
Hmm, I tried to create a resident file with #MB_SETFOREGROUND but the
compiler complains that this constant is unknown... but the following works:
How can compiling an app with it work, yet creating a residents file doesn't?
I've been using this constant in all my apps like the following, but I'd prefer
it to be a resident: #MB_SHOW=#MB_SETFOREGROUND|#MB_TASKMODAL
Hmm, I tried to create a resident file with #MB_SETFOREGROUND but the
compiler complains that this constant is unknown... but the following works:
Code: Select all
Debug #MB_SETFOREGROUND ; Returns 65536
I've been using this constant in all my apps like the following, but I'd prefer
it to be a resident: #MB_SHOW=#MB_SETFOREGROUND|#MB_TASKMODAL