Everything else that doesn't fall into one of the other PB categories.
netmaestro
PureBasic Bullfrog
Posts: 8452 Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada
Post
by netmaestro » Sun Feb 05, 2006 9:40 pm
without using tailbite...
Say I have this code:
Code: Select all
ProcedureDll.l CreateStandardWindow(w.l, h.l)
Win=OpenWindow(#PB_Any,0,0,w,h,#PB_Window_Systemmenu|#PB_Window_ScreenCentered,"Standard Window")
ProcedureReturn Win
Endprocedure
and I want to make a library command out of it so it's available to me whenever I want to use it. How is this done? How does Tailbite do it?
Last edited by
netmaestro on Tue Feb 21, 2006 3:43 pm, edited 4 times in total.
BERESHEIT
va!n
Addict
Posts: 1104 Joined: Wed Apr 20, 2005 12:48 pm
Post
by va!n » Sun Feb 05, 2006 10:20 pm
i think the pb compiler will convert your code to ASM and then it will compiled to an OBJ file... the linker will link the OBJ file to the final exe.. just an idea...
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Rings
Moderator
Posts: 1435 Joined: Sat Apr 26, 2003 1:11 am
Post
by Rings » Mon Feb 06, 2006 9:47 am
netmaestro wrote: without using tailbite...
Say I have this code:
Code: Select all
ProcedureDll.l CreateStandardWindow(w.l, h.l)
Win=OpenWindow(#PB_Any,0,0,w,h,#PB_Window_Systemmenu|#PB_Window_ScreenCentered,"Standard Window")
ProcedureReturn Win
Endprocedure
and I want to make a library command out of it so it's available to me whenever I want to use it. How is this done? How does Tailbite do it?
Tailbite comes with source, so study them
SPAMINATOR NR.1
netmaestro
PureBasic Bullfrog
Posts: 8452 Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada
Post
by netmaestro » Mon Feb 06, 2006 9:49 am
Yes, src.pack - how do I install it?
Last edited by
netmaestro on Tue Feb 21, 2006 3:44 pm, edited 2 times in total.
BERESHEIT
El_Choni
TailBite Expert
Posts: 1007 Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain
Post
by El_Choni » Mon Feb 06, 2006 10:07 am
Pu it in the TailBite directory, then open TBManager.exe, and click on "Extract sources"
El_Choni
netmaestro
PureBasic Bullfrog
Posts: 8452 Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada
Post
by netmaestro » Mon Feb 06, 2006 10:17 am
Ah, thanks. That's the ticket.
Last edited by
netmaestro on Tue Feb 21, 2006 3:45 pm, edited 2 times in total.
BERESHEIT
jack
Addict
Posts: 1358 Joined: Fri Apr 25, 2003 11:10 pm
Post
by jack » Mon Feb 06, 2006 7:51 pm
if don't mind tagging along a dll, you could just make a dll and a .def file and then an import lib, see
viewtopic.php?t=15687
then just import the functions (PB 4)
for example
Code: Select all
ImportC "MSVCRT.LIB"
sprintf.l(result.s,num_format.s,number.d) As "_sprintf"
sprintq.l(number.q,result.s,radix.l) As "__ui64toa"
atoi64.q(number.s) As "__atoi64"
EndImport
;example use
n.l
s.s
y.q
Avogadro.d=6.0221415e23
s=Space(25) ;allocate space
sprintf(s,"%18.15e",Avogadro)
debug s
n=sprintf("","%18.15e",Avogadro) ;supply a null "" as destination, to get the character length needed to "print" to string.
debug "number of characters required to print "+str(n)
y=atoi64("123")
Last edited by
jack on Tue Feb 07, 2006 5:58 am, edited 2 times in total.
netmaestro
PureBasic Bullfrog
Posts: 8452 Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada
Post
by netmaestro » Mon Feb 06, 2006 8:00 pm
Thank you Jack. That's a very helpful post.
Last edited by
netmaestro on Tue Feb 21, 2006 3:46 pm, edited 2 times in total.
BERESHEIT
DarkDragon
Addict
Posts: 2347 Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:
Post
by DarkDragon » Mon Feb 06, 2006 8:28 pm
Don't try to do a Linux Tailbite, it's nearly done(just a few parts are missing).
bye,
Daniel
Shannara
Addict
Posts: 1808 Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed
Post
by Shannara » Sun Feb 12, 2006 11:54 pm
DarkDragon wrote: Don't try to do a Linux Tailbite, it's nearly done(just a few parts are missing).
Only thing left would be a OSX tailbite
DarkDragon
Addict
Posts: 2347 Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:
Post
by DarkDragon » Mon Feb 13, 2006 2:15 pm
Shannara wrote: DarkDragon wrote: Don't try to do a Linux Tailbite, it's nearly done(just a few parts are missing).
Only thing left would be a OSX tailbite
Don't know, because I don't have a mac :-S . If I would get the money from Fred I would do it.
bye,
Daniel