Help ??? Error in loading file (qb.lib ) - Invalid format

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
Hoven
Newbie
Posts: 5
Joined: Tue Oct 11, 2005 2:05 pm
Location: Columbus, OH

Help ??? Error in loading file (qb.lib ) - Invalid format

Post 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.
===[Hoven ]===
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post 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 :-).
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post 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
Image
User avatar
Hoven
Newbie
Posts: 5
Joined: Tue Oct 11, 2005 2:05 pm
Location: Columbus, OH

Post 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. :D

Thanks!
===[Hoven ]===
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

Post 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 :oops:
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post 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!)
Image
User avatar
Hoven
Newbie
Posts: 5
Joined: Tue Oct 11, 2005 2:05 pm
Location: Columbus, OH

Post 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 :oops:
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?
===[Hoven ]===
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows »

With QB 4.5 ? I don't think so no...I've compiled plenty of applications on Windows XP myself....
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

Post by Patz QuickBASIC Creations »

Try PDS if your using QB4.5 now. It's got more features, plus INTEREST functions built right in! :lol: 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 :lol:
moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Post 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!
*****
If you are ahead of me, lead.
If you are behind me, follow.
If you are not doing anything,
Get out of the way.
User avatar
Hoven
Newbie
Posts: 5
Joined: Tue Oct 11, 2005 2:05 pm
Location: Columbus, OH

Post 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) :roll: .

Thanks for the crumbs to help me down the next path!
===[Hoven ]===
User avatar
Hoven
Newbie
Posts: 5
Joined: Tue Oct 11, 2005 2:05 pm
Location: Columbus, OH

Post by Hoven »

PQBC wrote:Try PDS if your using QB4.5 now. It's got more features, plus INTEREST functions built right in! :lol: 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 :lol:
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! :)
===[Hoven ]===
moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Post 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) :roll: .

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.
*****
Post Reply