QuickBasic Compile with /mbf

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
oldasdirt
Newbie
Posts: 3
Joined: Sat Dec 03, 2005 7:42 pm

QuickBasic Compile with /mbf

Post by oldasdirt »

Years ago, I used QuickBASIC (v. 4.5) to set up a small accounting program for my wife, complete with procedures just the way she'd done them with a calculator (and with an earlier interpreted basic routine from a previous computer system).

For continuity from the earlier stuff, I retained the Microsoft Binary Format ( /mbf ). Through a lot of years this thing was recompiled whenever updates or changes were required. My notes say the dos command line was

bc budget.bas /mbf /e

As recently as February, 2005, I inserted a change and successfully compiled and linked the thing with that line.

Fast-forward to early November. Another update, another compile, but the reports show numbers (supposed to be $) as -1.904 ... /E-.28 or similar. I'd seen this before, when the /mbf was entered incorrectly. I can testify that the line above does the same thing - a great many perturbations (moving the /... between bc and filename for example) give the same results. In February, and now, the system is the same. Windows XP Pro, pentium processor, 1 gig of memory, etc.

Clearly I'm doing something wrong - can anyone help me out with this please?

OTD
Antoni
Veteran
Posts: 132
Joined: Wed Jun 15, 2005 3:01 pm
Contact:

Post by Antoni »

Perhaps you are linking with a non-mbf module? Wrong run-time lib?

I'm afraid i can't be of more help, as I have never used the /mbf option.
moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Post by moneo »

I never used /mbf either.

Just an idea that occurred to me:

If I understand you correctly, the problem is compiling your changed program today. If you have an old PC around, you might load the QuickBasic stuff onto it, and try compiling on the old PC, assuming that the old PC has a version of Windows prior to the one giving the problem.

Then transfer the executable onto you current PC and test it. It should work, otherwise all older programs compiled with /mbf wouldn't work on your current PC.
*****
oldasdirt
Newbie
Posts: 3
Joined: Sat Dec 03, 2005 7:42 pm

Post by oldasdirt »

Antoni wrote:Perhaps you are linking with a non-mbf module? Wrong run-time lib?

I'm afraid i can't be of more help, as I have never used the /mbf option.
It'll be easy enough to renew the libraries from a backup. So I'll try that. The only difference in OS that I'm aware of is that Windows XP service pack 2 was installed between the last time the compiler worked correctly and this time.

Thanks for your thoughts!
OTD
oldasdirt
Newbie
Posts: 3
Joined: Sat Dec 03, 2005 7:42 pm

Post by oldasdirt »

If I understand you correctly, the problem is compiling your changed program today. If you have an old PC around, you might load the QuickBasic stuff onto it, and try compiling on the old PC, assuming that the old PC has a version of Windows prior to the one giving the problem.

Then transfer the executable onto you current PC and test it. It should work, otherwise all older programs compiled with /mbf wouldn't work on your current PC.
*****[/quote]

Sorry that I wasn't clear. I'm still using the same computer that I used in February to successfully compile my code. The OS (W XP Pro) has been updated with service pack 2 since - and that's the only difference I'm aware of.

Hmmm. Wonder how I can check to see if SP 2 is causing a problem.

Thanks for responding.
OTD
olderthandirt

Post by olderthandirt »

Let me restate the problem briefly:

Before SP2 from Windows XP, my code code compiles OK (no errors on QuickBASIC 4.5) and the exe file reads and writes files using the Microsoft Binary Format (mbf).

After SP2, the same code still compiles with no errors , but the files read by the resulting exe do not display correctly.

Does anyone out there have experience indicating that a switch on the compiler must be changed (not likely?) OR

That something about the environment for 'DOS' has been changed by SP2 OR

Anything else that I've overlooked that should be obvious?

By the way, exe files produced before SP2 still function properly.

Will appreciate any further help, speculation, etc.

OTD
moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Post by moneo »

I tried suggesting this before, but maybe I was not clear.

Try compiling your program ON ANOTHER PC that does not have SP2. Then transfer the executable onto your PC.

If it runs ok, you have a partial solution, that is, you can get it to work by compiling on another PC.

If it does not run, you're back to where you were before.
I really doubt that it won't run, because that implies that all executable programs using mbf that were compiled before SP2 would never run again after SP2.

Try this and let me know.
*****
If you are ahead of me, lead.
If you are behind me, follow.
If you are not doing anything,
Get out of the way.
Guest

Post by Guest »

moneo wrote:I tried suggesting this before, but maybe I was not clear.

...

Try this and let me know.
*****
You were clear.

Your protocol would provide an awkward but sort-of-usable fix - and I agree with you that something compiled pre-SP2 should run on the present configuration.

In fact, the last compilation, on this machine, was pre-SP2 and runs just fine.

Your protocol does have a practical problem. Both the computers in the house have W XP/SP 2. Running to a neighbor's or friend's place, especially when trying to do a bit of debugging (I don't usually make changes perfectly the first time!) is a bit of an imposition.

Maybe it's time to go completely to Quicken?

Thanks for your time.

OTD
Post Reply