Page 1 of 1
Help ??? Error in loading file (qb.lib ) - Invalid format
Posted: Tue Oct 11, 2005 2:32 pm
by Hoven
Hi there!
Well, let me start off by saying 'Hello There!".
I just found and joined this group (because I've got a QB problem or 3).
I'm glad to see there's always someplace to turn to when you've got questions about... whatever!
That said, I'm hoping
someone can help me out on my problem. At work, I have been given the assignment to update a farily old application written in QB 4.5. As part of my learning curve, I decided to try to recompile the code as is just to get my environment etc set up.
The trick is,
I can't even compile the code that's there, let alone make changes.
There's a routine that's called from all over the place called QPRINT.
When I try to
Run->Make EXE File, I get the error
"Subprogram not defined".
(by the way, that is how to compile a module, yes? 
)
I'm
guessing that this is part of a Library called QB.LIB, but when I attempt to start QB with the
/L option, I get
Error in loading file (qb.lib ) - Invalid format.
Is there something obvious and silly I'm missing? Can I "load" the libraries after I've started QB?
Any help/advice/assistance would be greatly appreciated.
Posted: Tue Oct 11, 2005 2:52 pm
by MystikShadows
Hi Hoven,
welcome aboard

, always good to see a new face among us

.
ok it seems that your Qb.lib file got corrupted over time. The only solution to that is to reinstall QB 4.5 if you still have the installation diskettes. This should fix your problem. If you don't have the diskettes anymore, you can always get QB from here:
http://www.ojodepez-fanzine.net/network/qbdl/ however I don't recommend it atleast until you get the OK from your boss. Just to be safe

. I don't think there's a legal problem in getting the files from that website because of how old QB is, but then again M$ abandonned QB but they never said "officially" that there was no problem getting it from the web. Unless someone does have such a letter/news/whatever about QB officially being public domain or freeware or abandonware? if so, I'd like a link to it so I can read it for myself.
Anyways, somehow, reinstall your version of QB to fix the QB.LIB issue.
Hope this helps

.
Posted: Tue Oct 11, 2005 3:53 pm
by {Nathan}
Yup. Your QB.lib file is currupt. I would get it from
www.qbnz.com though, since they have a
multitude of versions (and langueges) and there is no need to install, just unzip and run qb.exe.
And...
X-----X--XXXXX
X-----X-----X---
XXXXX-----X---
X-----X-----X---
X-----X--XXXXX
Posted: Tue Oct 11, 2005 4:20 pm
by Hoven
MystikShadows wrote:Hi Hoven,
welcome aboard

, always good to see a new face among us

.
ok it seems that your Qb.lib file got corrupted over time. [...]
Hey, thanks for the suggestion. I did go and fetch (several) new versions of both QB and just the QB.LIB file.
Sorry to say it's a "no go". I'm
still getting the same error message.
Time to go home now, but I'll hammer at this some more tomorrow, hopefully with some more suggestions.
Thanks!
Posted: Wed Oct 12, 2005 5:35 pm
by Patz QuickBASIC Creations
The only time I ever get that error is when I either mistype a SUB name (ex CNETER instead of CENTER) or when I insert my DECLARE SUB ------- and forget to actually make the SUBs

Posted: Wed Oct 12, 2005 8:07 pm
by {Nathan}
try re-extracting it (I mean, the command in ASM could be trying to open the wronge program or something...), and then running it. if it still doesn't work, post your source code (make sure to use the CODE tags!)
Posted: Fri Oct 14, 2005 1:47 pm
by Hoven
PQBC wrote:The only time I ever get that error is when I either mistype a SUB name (ex CNETER instead of CENTER) or when I insert my DECLARE SUB ------- and forget to actually make the SUBs

Hey there,
Hmmm, this application is in use and working, so it compiled at one time and there's been no changes since (ie, I doubt it's a spelling issue... I haven't touched the silly thing yet).
I'm suppose to make changes to it now, but it won't compile for me. Hey, that just reminded me.... I'll bet the last time this was compiled was under Windows NT. My machine is XP Pro. Could that cause a problem?
Posted: Fri Oct 14, 2005 3:37 pm
by MystikShadows
With QB 4.5 ? I don't think so no...I've compiled plenty of applications on Windows XP myself....
Posted: Fri Oct 14, 2005 4:54 pm
by Patz QuickBASIC Creations
Try PDS if your using QB4.5 now. It's got more features, plus INTEREST functions built right in!

But, there are patches for PDS to make it work perfectly with WINSHIT XP. (see sig if confused) Try using PDS and WIN98SE (it's the best one they've ever made).
Note: If XP isn't the problem, disregard this whole message

Posted: Fri Oct 14, 2005 8:19 pm
by moneo
Hi Hoven, and welcome.
I don't think there's anything wrong with your QB.LIB.
The QPRINT Sub that you're missing is part of Crescent Software's QuickPak Professional Library. QPRINT is not a function or statement contained in QBasic or QuickBasic.
I just looked in my QuickPak manual. Your have the following 2 choices:
1) If the QPRINT command in your program has any parameters that are -1, which means default color and page, then you should be able to replace it with a plain PRINT command to print the variable at the current cursor location. If the parameter(s) are not -1, then you may need to set the color and page. Note: The main purpose of QPRINT was speed.
2) Go to
www.ethanwiner.com and buy a version of QuickPak Professional Library for $199 plus shipping, and then link your programs with it. You may end up having to do this anyway because QPRINT may not be the only QuickPak command that these programs used. Anyway, the company is going to pay for it. You'll find that this library has a bunch of excellent goodies, and a great manual.
Good luck!
*****
Posted: Wed Oct 19, 2005 1:14 pm
by Hoven
moneo wrote:Hi Hoven, and welcome.
I don't think there's anything wrong with your QB.LIB.
The QPRINT Sub that you're missing is part of Crescent Software's QuickPak Professional Library. QPRINT is not a function or statement contained in QBasic or QuickBasic.
[....]
Well, now that's interesting. I managed to speak to the guy who last worked on this application, and he's now telling me that they had created a "customized" library. He sent it to me, but I got the same result. So neither the original or "customized" QB.LIB will load.
So, thanks, I'll look into this QuickPak stuff next (or see about not using QPRINT, although I'm guessing there are other sub routines in the code that they've thrown into that library too)
.
Thanks for the crumbs to help me down the next path!
Posted: Wed Oct 19, 2005 1:16 pm
by Hoven
PQBC wrote:Try PDS if your using QB4.5 now. It's got more features, plus INTEREST functions built right in!

But, there are patches for PDS to make it work perfectly with WINSHIT XP. (see sig if confused) Try using PDS and WIN98SE (it's the best one they've ever made).
Note: If XP isn't the problem, disregard this whole message

Well, it may not be XP that's the problem, but at this point I'll try just about anything to get this project going.
Thanks for the info... I'll check out PDS!
Posted: Wed Oct 19, 2005 1:43 pm
by moneo
Hoven wrote:.....
So, thanks, I'll look into this QuickPak stuff next (or see about not using QPRINT, although I'm guessing there are other sub routines in the code that they've thrown into that library too)

.
Thanks for the crumbs to help me down the next path! [/color]
Hoven, Another way to determine the use of "foreign" functions and subs is to look at the DECLARE statements at the top of each program, since most functions and subs need to be declared before being invoked. If you see DECLARE statements for functions/subs that are not defined within the program, then for sure they want to come from a library file.
Gather and post a list of some these DECLARE statements that are foreign to the programs, and I'll tell you if they come from the QuickPak library.
*****