Posts: 9
Threads: 3
Joined: Jan 2004
Hi All,
I have written two functions that are currently in a library called asm.qlb that I must call at runtime using:
qb /l asm.qlb
and then declare the functions whenever I wish to use them. I understand that it is possible to roll functions into the "standard" qb45 distribution so that they appear seamless to the user - can someone please hold my hand and tell me how to do that? I thought it was
link /q asm.lib,asm.qlb,,brun45.lib
but that threw an error when I tried it.
Posts: 3,616
Threads: 287
Joined: Jan 2003
Make a file. Call it, say, "Declares.bi". Inside the file, put all the declarations for the subroutines and functions in your library.
Then make a file, call it "Template.bas", and in it put this:
Code:
'$INCLUDE: 'Declares.bi'
Then make a file, call it "SDefault.bat". In it put:
Code:
QB Template.bas /Lasm
Then whenever you want to write a program that uses your library, load SDefault.bas.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 9
Threads: 3
Joined: Jan 2004
Cheers - however I have been led to believe that it is possible to roll the functions into the main runtime library used by qb45 so that there is no need for any templates or command line switches.
Thus from a user POV the functions would appear exactly the same as the built in functions such as inp and so on.
Posts: 3,616
Threads: 287
Joined: Jan 2003
Hmm. You mean make it so that you can just flip open QB and use your own function, without including a lib?
Probably, yes. I'm not sure, though. Sorry.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 3,288
Threads: 167
Joined: Nov 2001
Quote:Cheers - however I have been led to believe that it is possible to roll the functions into the main runtime library used by qb45 so that there is no need for any templates or command line switches.
Thus from a user POV the functions would appear exactly the same as the built in functions such as inp and so on.
You can add the functions to QB.LIB using LIB.exe
You have to make the declare statements though.
Posts: 4,307
Threads: 63
Joined: May 2003
You could write those two functions in another .BAS file and then use it as a module. The only advantage of this is you could complete your program in one module and write all the supporting functions in the other module. Then you could compile the second module into a lib and use the lib instead of the module.