[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2008-01-08T16:00:30-05:00 http://www.petesqbsite.com/phpBB3/app.php/feed/topic/2546 2008-01-07T19:34:27-05:00 2008-01-07T19:34:27-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16278#p16278 <![CDATA[Libraries]]>

Statistics: Posted by Sinuvoid — Mon Jan 07, 2008 7:34 pm


]]>
2008-01-04T16:12:49-05:00 2008-01-04T16:12:49-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16228#p16228 <![CDATA[Same here]]>
I don't remember exactly how to do it (it's been at least 4 years since I did it last!) but information on how to do it isn't hard to find. I believe the syntax is something like...

link /qu bcom45.lib mylib.lib

or something like that...meh...I forget. :D
Heh, I had forgotten how as well, so I looked at my old makeqlb.bat which contains:
LINK /Q %1.LIB, %1.QLB, NUL, BQLB45;

The old LIB knowledge slammed back into my head (I quess QB isn't hard to jump back into...).

So, to make a QLB from FUNPAK.LIB, we'd do a:
LINK /Q FUNPAK.LIB, FUNPAK.QLB, NUL, BQLB45;

The /Q switch says make a QLB. It can be placed at the end, just has to be before that semicolon. To make a map file, replace NUL
with its name, or leave the space blank and the name will be
FUNPAK.MAP.

- Dav

Statistics: Posted by Dav — Fri Jan 04, 2008 4:12 pm


]]>
2007-12-25T19:10:49-05:00 2007-12-25T19:10:49-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16172#p16172 <![CDATA[Libraries]]> Statistics: Posted by Sinuvoid — Tue Dec 25, 2007 7:10 pm


]]>
2008-01-08T16:00:30-05:00 2007-12-25T17:38:55-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16170#p16170 <![CDATA[Libraries]]>
You can do the same thing for BAS files from text.

Make sure to save your modules as Text Readable by other programs when saving them. Otherwise you will get a very ugly looking text file that you cannot read or copy. I imagine you already know that.

Still King here!

Ted

Statistics: Posted by burger2227 — Tue Dec 25, 2007 5:38 pm


]]>
2007-12-24T23:28:13-05:00 2007-12-24T23:28:13-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16151#p16151 <![CDATA[Libraries]]>
Alright, in the source for your library, the QB editor will, as with any other QB program, create the DECLAREs for each SUB or FUNCTION you make. What you do is copy these DECLARE lines to a new file with the .BI extension. Then, in the program you're going to make that uses the library, use something like

'$INCLUDE "mylib.bi"

at the top of your source code. That will include all of the declares for your library so the functions can be used.

Statistics: Posted by Nodtveidt — Mon Dec 24, 2007 11:28 pm


]]>
2007-12-24T15:06:35-05:00 2007-12-24T15:06:35-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16149#p16149 <![CDATA[Libraries]]>
You should be able to just "Make Library" on that code.

Now all you would have to do is create and '$INCLUDE a .bi for it that contains the DECLAREs, unless you want to put them at the top of the source code that's going to use the library. And again, don't forget the /l switch.
Explain that more deeply please :)

Statistics: Posted by Sinuvoid — Mon Dec 24, 2007 3:06 pm


]]>
2007-12-24T15:03:10-05:00 2007-12-24T15:03:10-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16148#p16148 <![CDATA[Libraries]]> Statistics: Posted by Nodtveidt — Mon Dec 24, 2007 3:03 pm


]]>
2007-12-24T15:04:24-05:00 2007-12-24T15:00:46-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16147#p16147 <![CDATA[Libraries]]>
Thanks anyways :D

Statistics: Posted by Sinuvoid — Mon Dec 24, 2007 3:00 pm


]]>
2007-12-24T15:02:28-05:00 2007-12-24T14:58:57-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16146#p16146 <![CDATA[Libraries]]>
EDIT: In fact, I just tried it out and it built the library just fine. :D Now all you would have to do is create and '$INCLUDE a .bi for it that contains the DECLAREs, unless you want to put them at the top of the source code that's going to use the library. And again, don't forget the /l switch.

Statistics: Posted by Nodtveidt — Mon Dec 24, 2007 2:58 pm


]]>
2007-12-24T14:46:38-05:00 2007-12-24T14:46:38-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16144#p16144 <![CDATA[Libraries]]> I meant't creating QB libraries and using them.

Heres my code if it helps...

Code:

DECLARE SUB Popup (A AS INTEGER, B AS INTEGER, c AS INTEGER, d AS INTEGER, text AS STRING, x AS INTEGER, y AS INTEGER)DECLARE SUB Textbox (A AS INTEGER, B AS INTEGER, c AS INTEGER, d AS INTEGER, text AS STRING, x AS INTEGER, y AS INTEGER)DECLARE SUB Checkbox (A AS INTEGER, B AS INTEGER, c AS INTEGER, d AS INTEGER)DECLARE SUB Backround (A AS INTEGER)'**********************************************************************************************'* This is Interface Library Created and Coded by Souylsin                                    *'* Backround Command                                                                          *'* x 1 TO 63 color of backround. 1 being black to 63 being white.                             *'* Checkbox Command                                                                           *'* x,x, top left corner  x, length x height                                                   *'* Popup Command                                                                              *'*  Stynax: a,b,c,d,"text",e,f                                                                *'* a,b, top left corner  c, length d, height  "", text here e, x plane to put text f,         *'* y plane to put text                                                                        *'* Textbox Command                                                                            *'* Same as Above                                                                              *'**********************************************************************************************'Testing area'Backround CommandSUB Backround (A AS INTEGER)PALETTE 1, A + (A * 256) + (A * 65536)LINE (0, 0)-(320, 320), 1, BFEND SUB'Checkbox CommandSUB Checkbox (A AS INTEGER, B AS INTEGER, c AS INTEGER, d AS INTEGER)PALETTE 12, 0 + (0 * 256) + (0 * 65536)LINE (A, B)-(c, d), 12, BFPALETTE 11, 63 + (63 * 256) + (63 * 65536)LINE (A, B)-(c, d), 11, BPALETTE 10, 63 + (63 * 256) + (63 * 65536)LINE (A + 10, B + 10)-(c - 10, d - 10), 10, BEND SUB'Popup CommandSUB Popup (A AS INTEGER, B AS INTEGER, c AS INTEGER, d AS INTEGER, text AS STRING, x AS INTEGER, y AS INTEGER)PALETTE 7, 63 + (63 * 256) + (63 * 65536)LINE (A + 0, B + 0)-(c + 6, d + 5), 7, BFPALETTE 9, 0 + (0 * 256) + (0 * 65536)LINE (A, B)-(c, d), 9, BFPALETTE 10, 63LINE (A - 1, B - 1)-(c + 1, d + 1), 10, BPALETTE 6, 63LINE (A + 1, B + 1)-(c - 1, d - 1), 6, BLOCATE x, yPRINT textEND SUB'Textbox CommandSUB Textbox (A AS INTEGER, B AS INTEGER, c AS INTEGER, d AS INTEGER, text AS STRING, x AS INTEGER, y AS INTEGER)PALETTE 13, 0 + (0 * 256) + (0 * 65536)LINE (A, B)-(c, d), 13, BFPALETTE 11, 63 + (63 * 256) + (63 * 65536)LINE (A, B)-(c, d), 11, BEND SUB

Statistics: Posted by Sinuvoid — Mon Dec 24, 2007 2:46 pm


]]>
2007-12-24T13:49:19-05:00 2007-12-24T13:49:19-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16142#p16142 <![CDATA[Libraries]]> Statistics: Posted by burger2227 — Mon Dec 24, 2007 1:49 pm


]]>
2007-12-24T13:45:03-05:00 2007-12-24T13:45:03-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16140#p16140 <![CDATA[Libraries]]>
You should know that generally, libraries contain only functions (SUB and FUNCTION in QB). If you're building a library with QB itself, you would simply have a project that contains a bunch of SUBs and FUNCTIONs that you don't want to have to copy over and over again. :) You would use the "Make Library" menu option in the QB editor. It'll create the library and quicklibrary automatically for you.

To make a library in assembly is different. The same basic concepts apply though; you're making a collection of functions. The difference is that you have to keep track of certain registers manually, and you have to know how to use LIB and LINK from the command line. Of course, you'll also have to know how to code in assembly language. :D

To use a library in the IDE, all you do is invoke the /l switch with the name of the library. Say you have library "foo", you do this:

qb /l foo

and the IDE will load with your library ready to use. Having the LIB alone isn't enough for the IDE; you also have to have the QLB version, which is what you need LINK for...I don't remember exactly how to do it (it's been at least 4 years since I did it last!) but information on how to do it isn't hard to find. I believe the syntax is something like...

link /qu bcom45.lib mylib.lib

or something like that...meh...I forget. :D

Also, most people who make libraries also tend to link in qb.lib. Since QB can only load one library at a time, lib.exe can assembly multiple library modules together to form a single .lib file, which you can then LINK to a QLB.

Statistics: Posted by Nodtveidt — Mon Dec 24, 2007 1:45 pm


]]>
2007-12-24T12:13:08-05:00 2007-12-24T12:13:08-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=16139#p16139 <![CDATA[Libraries]]>
1.Create them

2. Use them

Ive looked at tutorials and they all seem to be saying different things :?

Statistics: Posted by Sinuvoid — Mon Dec 24, 2007 12:13 pm


]]>