QLB libraries

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

jakykong
Full Member
Posts:30
Joined:Wed Jun 25, 2003 1:05 pm
QLB libraries

Post by jakykong » Wed Sep 01, 2004 11:51 am

ok so LIB.exe is pretty easy to use for my needs.
I am using the C programming language to make functions and subs for qbasic to use instead of and in addition to qbasic commands to allow for qbasic to be a much lower-level language but still have the higher-level functions. Ok, so that is what i am doing. The problem i am having is getting my C functions to work in qbasic. I can compile them to an object file, then put them into a library, but the library is not a qlb library, and i can't figure out how to make it into one. I know it has to do with LINK but i can't find any documentation at all on the command line parameters of LINK, so i have no idea how to use LINK to make a LIB into a QLB. Can anyone help me with this?
I've not been a QBasic programmer since at least 2004. It was fun; I've moved on. Best of luck.

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Re: QLB libraries

Post by Dr_Davenstein » Thu Sep 02, 2004 4:01 am

Have you tried MultiLib yet? It's a QuickBasic library utility. Just Google for MultiLib QBasic if you want to check it out. ;)


Here's the direct method to make a .QLB file from a .LIB file...

Code: Select all

LINK /Q MyLib.LIB, MyLib,,BQLB45;
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

jakykong
Full Member
Posts:30
Joined:Wed Jun 25, 2003 1:05 pm

Re: QLB libraries

Post by jakykong » Mon Sep 06, 2004 9:01 am

cant fine the multilib program anywhere! it looks to me like it is not available yet but will be...  Anyway, the LINK command gave me **32** errors in the process and i renamed the files to match the command exactly...
i'm going to try recompiling the OBJ file, but if that doesent work, i dont know what to do!
I've not been a QBasic programmer since at least 2004. It was fun; I've moved on. Best of luck.

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Re: QLB libraries

Post by Dr_Davenstein » Mon Sep 06, 2004 10:19 am

Well, are all of the other files in the same directory? I mean LIB, LINK, BQLB45, etc...

It would require that all of those be in the same folder. It can also get real messy if the OBJ files are in different dirs. I'll see if I can find that link to MultiLib. It was kinda hard for me to find too. ::)
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

jakykong
Full Member
Posts:30
Joined:Wed Jun 25, 2003 1:05 pm

Re: QLB libraries

Post by jakykong » Mon Sep 06, 2004 12:03 pm

yeah, all the files are in the same folder. i downloaded the qb45 install diskettes and installed with the setup program. no alterations were made to the files in the dir(only new ones were added). The list file that i got running your command(LINK /q hello.lib, hello,,bqlb45) contained 32 errors. the list file contained all the below:
BQLB45.LIB(..\rt\ulstart.asm) : error L2025: _main : symbol defined more than once

Start  Stop   Length Name                   Class
00000H 002D8H 002D9H _TEXT                  CODE
002DAH 0084DH 00574H CODE                   CODE
00850H 008CFH 00080H DUMMY                  DUMMY
008D0H 008D0H 00000H FAR_DATA               FAR_DATA
008D0H 008D0H 00000H FAR_BSS                FAR_BSS
008D0H 03BE6H 03317H NULL                   BEGDATA
03BF0H 03C37H 00048H _DATA                  DATA
03C38H 03C45H 0000EH CDATA                  DATA
03C46H 03C46H 00000H XIB                    DATA
03C46H 03C46H 00000H XI                     DATA
03C46H 03C46H 00000H XIE                    DATA
03C46H 03C46H 00000H XPB                    DATA
03C46H 03C46H 00000H XP                     DATA
03C46H 03C46H 00000H XPE                    DATA
03C46H 03C46H 00000H XCB                    DATA
03C46H 03C46H 00000H XC                     DATA
03C46H 03C46H 00000H XCE                    DATA
03C46H 03C51H 0000CH DBDATA                 DATA
03C52H 03C57H 00006H _BSS                   DATA
03C58H 03C58H 00000H BC_SAB                 BC_SEGS
03C58H 03C5BH 00004H BC_SA                  BC_SEGS
03C5CH 03C61H 00006H NMALLOC                BC_VARS
03C62H 03C62H 00000H ENMALLOC               BC_VARS
03C62H 03C62H 00000H XOB                    BSS
03C62H 03C62H 00000H XO                     BSS
03C62H 03C62H 00000H XOE                    BSS
03C70H 03C70H 00000H STACK                  STACK
03C70H 043C8H 00759H SYMBOL                

Origin   Group
008D:0   DGROUP

Program entry point at 03C7:0000

HELLO.LIB(A) : error L2029 : '_getc' : unresolved external
HELLO.LIB(A) : error L2029 : '_fputc' : unresolved external
HELLO.LIB(A) : error L2029 : '_fopen' : unresolved external
HELLO.LIB(A) : error L2029 : '_fseek' : unresolved external
HELLO.LIB(A) : error L2029 : '_getchar' : unresolved external
HELLO.LIB(A) : error L2029 : '_vsprintf' : unresolved external
HELLO.LIB(A) : error L2029 : '_fprintf' : unresolved external
HELLO.LIB(A) : error L2029 : '_gets' : unresolved external
HELLO.LIB(A) : error L2029 : '_ftell' : unresolved external
HELLO.LIB(A) : error L2029 : '_fflush' : unresolved external
HELLO.LIB(A) : error L2029 : '_fscanf' : unresolved external
HELLO.LIB(A) : error L2029 : '_fputs' : unresolved external
HELLO.LIB(A) : error L2029 : '_sprintf' : unresolved external
HELLO.LIB(A) : error L2029 : '_clearerr' : unresolved external
HELLO.LIB(A) : error L2029 : '_ungetc' : unresolved external
HELLO.LIB(A) : error L2029 : '_ferror' : unresolved external
HELLO.LIB(A) : error L2029 : '_sscanf' : unresolved external
HELLO.LIB(A) : error L2029 : '_fwrite' : unresolved external
HELLO.LIB(A) : error L2029 : '_printf' : unresolved external
HELLO.LIB(A) : error L2029 : '__files' : unresolved external
HELLO.LIB(A) : error L2029 : '_putc' : unresolved external
HELLO.LIB(A) : error L2029 : '__cruntime' : unresolved external
HELLO.LIB(A) : error L2029 : '_fgetc' : unresolved external
HELLO.LIB(A) : error L2029 : '_scanf' : unresolved external
HELLO.LIB(A) : error L2029 : '_putchar' : unresolved external
HELLO.LIB(A) : error L2029 : '_puts' : unresolved external
HELLO.LIB(A) : error L2029 : '_fread' : unresolved external
HELLO.LIB(A) : error L2029 : '_fgets' : unresolved external
HELLO.LIB(A) : error L2029 : '_fclose' : unresolved external
HELLO.LIB(A) : error L2029 : '_feof' : unresolved external
and just in case you need to know, i compiled my OBJ file with Miracle C(get it at dowlnoad.com). i compiled this source code(exactly):
#include <stdio.h>
int main()
{
printf("Hello, world!");
return 1;
}
and that is what i have so far.
I've not been a QBasic programmer since at least 2004. It was fun; I've moved on. Best of luck.

jakykong
Full Member
Posts:30
Joined:Wed Jun 25, 2003 1:05 pm

Re: QLB libraries

Post by jakykong » Mon Sep 06, 2004 12:04 pm

also, if you have AIM then we can go onto AIM and you could give me the multilib with a file transfer in aim... my screenname is the same on AIM as this forum...
I've not been a QBasic programmer since at least 2004. It was fun; I've moved on. Best of luck.

jakykong
Full Member
Posts:30
Joined:Wed Jun 25, 2003 1:05 pm

Re: QLB libraries

Post by jakykong » Mon Sep 06, 2004 12:24 pm

ok so i found the Multilib program(and figured out how to use it). but it gave me the same errors as the LINK command did, and really wasnt any more help than anything else... i think it may be something with the bqlb45 library that isnt liking my C obj file... do you know of any C compilers for DOS that will make an OBJ file that Qbasic will work with?
I've not been a QBasic programmer since at least 2004. It was fun; I've moved on. Best of luck.

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Re: QLB libraries

Post by Dr_Davenstein » Mon Sep 06, 2004 1:08 pm

Have you tried using a 16Bit compiler?

Here's a link to Borland's old stuff...
http://community.borland.com/museum/

You might try compiling with that and see if it helps. ;)
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

jakykong
Full Member
Posts:30
Joined:Wed Jun 25, 2003 1:05 pm

Re: QLB libraries

Post by jakykong » Tue Sep 07, 2004 9:29 am

i only got one error that is _printf is an unresolved external. Qbasic starts with it, but i run into one problem:

DECLARE SUB main CDECL ()
CALLS main

causes the whole command window to close and return me to my windows 2000 folder tree screen. by declaring it without CDECL it gives me an error. The code i compiled was nothing but this:

#include <stdio.h>
main ()
{
&nbsp; printf("Hello, world!\n")
}

and that should be the same as the qbasic statement:

PRINT "Hello, world!"

but it stops the whole thing and closes my window.
I've not been a QBasic programmer since at least 2004. It was fun; I've moved on. Best of luck.

jakykong
Full Member
Posts:30
Joined:Wed Jun 25, 2003 1:05 pm

Re: QLB libraries

Post by jakykong » Tue Sep 07, 2004 9:33 am

ok so that isnt the problem any more. i ran the command window in full screen mode to find out what errors i would get. The NTVDM(or something) CPU encountered an illegal operation at some long address... so i think it is a compatability thing. I am going to try the same thing on my 486 and see if that changes it...
I've not been a QBasic programmer since at least 2004. It was fun; I've moved on. Best of luck.

Guest

Re: QLB libraries

Post by Guest » Wed Sep 08, 2004 7:37 am

If it's 32bit then it probably won't work with quickbasic
since it's 16 bit.

You might try using QuickC

jakykong
Full Member
Posts:30
Joined:Wed Jun 25, 2003 1:05 pm

Re: QLB libraries

Post by jakykong » Wed Sep 08, 2004 7:55 pm

QuickC... never heard of it. it's a 16 bit C compiler for DOS i am assuming... know where i can get a copy?
I've not been a QBasic programmer since at least 2004. It was fun; I've moved on. Best of luck.

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Re: QLB libraries

Post by Dr_Davenstein » Thu Sep 09, 2004 7:23 am

You could try that link that I posted up there. It's not QuickC, but it's a 16Bit DOS compiler. It's called TurboC, by Borland. It's extremely easy to use and it's free... and plenty fast too ;)
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

Guest

Re: QLB libraries

Post by Guest » Thu Sep 09, 2004 10:28 am

QuickC. MS C answer to QuickBasic.

It's around.

I don't think it sold much (relatively speaking of course).
I don't know how good/bad it is, but it should be compatible some way with QuickBasic I would think, perhaps commented in the help file if/when you find it.

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Re: QLB libraries

Post by Dr_Davenstein » Fri Sep 10, 2004 10:07 am

Oh god... ::)
I can't believe I didn't notice that. QuickC...QuickBasic... ;D
I'm gonna have to check it out too.
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

Post Reply