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.
Using PureBasic Functions in ASM Libraries
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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
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
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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.
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.
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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
When the LIBs are written in C, you do:
Its like calling WinAPI from Assembly, you know.
cya,
...Danilo
(registered PureBasic user)
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
Code: Select all
EXTERN _PB_OpenWindow@28 ; 7 ARGs x 4bytes = 28 bytes
same PUSHes....
CALL _PB_OpenWindow@28
cya,
...Danilo
(registered PureBasic user)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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.
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.