Posts: 3,343
Threads: 83
Joined: Mar 2003
I hate to sound like an absolute n00b, but... I have a couple of library problems.
1) I am trying to create a program that uses RelLib and DS4QB++, but I'm having trouble getting the program to work. Is there a tutorial on the net about using multiple libs, or do I make a custom lib that includes RelLib, DS4QB++ and QB.QLB?
2) Whenever I'm including libraries I am forced to specify an absolute path to them, for some dumb reason it can't handle '$INCLUDE: 'rellib.bi', I have to go '$INCLUDE: 'c:\qbasic\qb45\game\rellib.bi'. So a) will this be a problem when I go to compile and b) how do I fix it?
Posts: 704
Threads: 0
Joined: Dec 2002
If your include files are in c:\qbasic\qb45\game, before running QB or the compiler, do
SET INCLUDE=C:\QBASIC\QB45\GAME\
(You can put that in your autoexec or do whatever your version of windows requires for setting environment variables. You can do the same thing with the LIB environment variables and your library files.)
As for 1, you can't combine quick libraries directly. You have to combine the .LIB files to which they correspond and then make the quick library from that. (Alternatively, you can combine the individual object modules.) Let's say you have LIB1.LIB and LIB2.LIB and you want to make COMBLIB.LIB and COMBLIB.QLB:
LIB COMBLIB +LIB1.LIB +LIB2.LIB;
LINK /Q COMBLIB.LIB, COMBLIB,, BQLB45;
(LIB makes COMBLIB.LIB and LINK makes COMBLIB.QLB.)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 3,343
Threads: 83
Joined: Mar 2003
What is the list file? What do I do with it?
Edit: got it to work now, thanks! But... how does it work? Without a game.bi file and all...
Posts: 6,419
Threads: 74
Joined: Mar 2002
Just make your own .BI joining the original .BI files.
Posts: 704
Threads: 0
Joined: Dec 2002
.BI (include) files aren't part of the library. They just contain source code that libraries quite often need in order to work. LIB and LINK don't have anything explicitly to do with them. All the '$INCLUDE metacommand does is in effect say, "Hey compiler/interpreter, go find the file 'blah.bi' and pretend its contents are explicitly in the file in place of this metacommand in the file that you're currently compiling/interpreting."
The list file for LIB will contain a listing of the routines and what modules that they're in within the library. I'm not sure what it shows exactly for LINK. (If you include the trailing semicolons, you won't get a list file unless you explicitly specify that you want one on the command-line.)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 3,343
Threads: 83
Joined: Mar 2003
I'm still a cabbage...
I found MultiLib on AAP's site, so I made up a library including:
RelLib
QB (default lib)
DS4QBPP (module)
And it seemed to make a .LIB and a .QLB file (and a .TMP file) quite nicely. So I go to the .PIF file, and tell it "/LC:\QBASIC\QB45\GAME\GAME.QLB/ah, and start QBasic. Now what do I do, because all the subs I try to call aren't working?
Posts: 704
Threads: 0
Joined: Dec 2002
.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 3,288
Threads: 167
Joined: Nov 2001
Did you include the BI files?
Posts: 3,343
Threads: 83
Joined: Mar 2003
I worked it out... don't worry. Thanks guys for your help.