Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with linking libraries
#1
Okay, I am having several rather frustrating problems, all related to LIB files.

Firstly, while compiling into an EXE file from QB71's Run menu was always easy before, suddenly whenever I try to compile anything it says I'm missing the file "bcl71enp.lib" which is apparently required for compiling in protected mode. The weird thing is, I didn't move or delete that file, but it's not there, and it's not in my QB71 zip fle, but I *ALWAYS* compiled with that protected mode option selected before, and never had any problems. What gives??

Second, whenever I try to compile with an option to link to a different library, again from the Run menu, it won't even let me get to the screen where I specify what library I want to link, because it tells me there's an undefined subroutine in my code!!! How do I get around that? How can I compile a program that contains references to routines in a library, if it stops me before I even get to the stage of creating the link?

Third, if linking to a library can only be done at compile time, how can anyone ever possibly test-run programs they're writing by using Shift-F5? Do you really have to compile every time you want to test something?

And lastly, I have been trying to $include some very standard .BI header files, but those files contain all sorts of lines which are truncated with the underscore (_) character in order to continue on the next line. QB doesn't seem to recognize that at all, and expects the line to continue, so why are those BI files written that way and how can they ever possibly be used?

Thanks to anyone who can clear any of this up. I've been programming in QB for years and years, but have never until now linked or included any external files.
Reply
#2
>>"...it says I'm missing the file "bcl71enp.lib"..."

USUALLY webmasters do not upload complete zips, normally a qbx zip must have 5Mb minimum, go to
http://www.sia-tech.com/downloads/BC7.ZIP
http://www.brisray.com/qbasic
http://homepages.ihug.co.nz/~twotowers/software/
and download a complete zip

>>"...whenever I try to compile with an option to link to a different library..."

as far as i know, to use a library, you need to load the library when you open the editor, not when you will compile from the RUN menu:
Qbx.exe prog.bas /L [libraryname]
if you try to change the library i think it won't recognize that because it's not been loaded

>>"if linking to a library can only be done at compile time, how can anyone ever possibly test-run programs..."

linking a library it's different than loading a library, to use a library load it when you open the editor, to link files you need to see the options of the file LINK.EXE in your BIN subdirectory writing: LINK/?

>>"...those files contain all sorts of lines which are truncated with the underscore (_)... QB doesn't seem to recognize that at all..."

quickbasics are prepared to recognize the underscores but they ONLY can be used when LOADING a file, you can read this if you go to the top of this page, click 'knowledge base', then write just the number 43092
am the last survivor of the Quickbasics world (at least at qbasicnews).
Reply
#3
Thank you very much, for your responses on all those subjects, they helped tremendously. I did not realize that it was possible to load a LIB file along with the actual QB editor. So does that mean that if I use:

Qbx.exe prog.bas /L whatever.LIB

and then later compile from the Run menu from within the editor, that LIB file will be automatically linked/included in my stand-alone EXE file? Or do I still have to use a /L option when compiling from the Run menu as well?
Reply
#4
>>"...I did not realize that it was possible to load a LIB file along with the actual QB editor..."

nope, i forgot to add that the library must be a Quick Library, that means a library with the extension .QLB, if you want to know how to make a Quick library (.qlb) you can go to this Url
http://www.network54.com/Forum/message?f...1017427389

>>"...and then later compile from the Run menu from within the editor, that file will be automatically included in my stand-alone EXE file?"

yes, will be included if the library used has the extension .QLB, the compiler only will add those functions or routines that you use from that library, that's for trying to keep the executable small

>>"Or do I still have to use a /L option when compiling from the Run menu as well?"

from the RUN menu no, because you have Already loaded the Quick library
am the last survivor of the Quickbasics world (at least at qbasicnews).
Reply
#5
Okay, so I have heard a variety of ways of dealing with library files, including BI, QLB, and .A files. But nothing on LIB files yet. How do you access a LIB file using a QB program? Do you make your own BI file that refers to the LIB, and then include that BI file in your program?
Reply
#6
as far as i know, when you load the qb editor with a .QLB (thats what you specify when loading with /l... a .qlb) then, when you compile your program, the IDE automatically links a .lib with the same name. so... if you start the editor with qb /l mylib, it will grab mylib.qlb for editor use. then, when you want to compile, it will look for mylib.lib. im 99% sure about this, anyways
Reply
#7
Ahhhhhhhhh..... okay, if you're right THAT would explain the missing link between QLB files and LIB files. I knew there had to be an answer! Wink
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)