Page 1 of 1
Posted: Wed May 29, 2002 9:45 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.
In the desc file you can declare which PureBasic Libraries you are using in your lib.
Can't get it to work...
Has anyone progress with that?
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
Posted: Wed May 29, 2002 11:25 pm
by BackupUser
Restored from previous forum. Originally posted by El_Choni.
Hi Franco,
You can declare them, but it has no effect yet. In fact, this is the only problem I know which makes coding PB libraries with PB impossible at this time (I tried to code a PB PureLibrary maker some time ago).
PB functions are only included in the .exe if the PB source code includes them. That is, if your asm library uses PB_Str and the code using the library does not include Str(), the thing will be uncompilable.
But, as declaration of PB libraries is possible within the Desc file, we all hope this will be working soon.
Bye,
El_Choni
Posted: Thu May 30, 2002 1:07 am
by BackupUser
Restored from previous forum. Originally posted by fred.
You can do it.
For example in the .DESC:
1
Window
Will include the Window lib with your library
To access the PB commands:
extern PB_OpenWindow
PUSH xxx
...
CALL PB_OpenWindow
Should work...
Fred - AlphaSND
Posted: Thu May 30, 2002 2:25 am
by BackupUser
Restored from previous forum. Originally posted by Franco.
Hi El_Choni, thanks for your response.
I had till now no luck to get it to work too.
Hi Fred, thanks for you tip it's truly appreciated.
But that's what I did. I will do a second try as soon as possible.
Maybe there is something I missed.
Thanks.
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
Posted: Fri May 31, 2002 9:01 am
by BackupUser
Restored from previous forum. Originally posted by Danilo.
Franco, i had the same problem before.
Its because some functions are written
in C and with C-Calling-Convention.
If its written in ASM, you do
Code: Select all
EXTERN PB_OpenWindow
PUSH dword something ; 7 - Title$
PUSH dword something ; 6 - Flags
PUSH dword something ; 5 - Height
PUSH dword something ; 4 - Width
PUSH dword something ; 3 - y
PUSH dword something ; 2 - x
PUSH dword something ; 1 - #Window
CALL PB_OpenWindow
When the LIBs are written in C, you do:
Code: Select all
EXTERN _PB_OpenWindow@28 ; 7 ARGs x 4bytes = 28 bytes
same PUSHes....
CALL _PB_OpenWindow@28
Its like calling WinAPI from Assembly, you know.
cya,
...Danilo
(registered PureBasic user)
Posted: Fri May 31, 2002 3:06 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.
Thanks Danilo for the additional information.
How do I know in which language the lib is written
It seems I have to go a long, long way... to get all things straight.
Suppose that the doc's are lacking some needed info.
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.