Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I know, I must be stupid
#1
Alright, I've got my program working, and I swear I must be stupid for asking this but; I can't seem to get the .exe version of my file to work correctly. I have it in .bas and then attempt to make it an .exe so I can use it without Qbasic and when I attempt to open the new .exe the dos window opens, and then immediately closes without displaying or executing any part of the program.

Sorry for such a dumb question, thanks...
Reply
#2
forgive me for being blunt, but the stupid thing is that you haven't posted source code. Wink
Reply
#3
EclipseOTO:

It would interest me to know if, if you save it as an exe file that needs QBRUN.exe to run, will it now run, or, will it also open a screen and then close again?
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#4
um... where do i find the source code, and I can't seem to find "QBrun.exe" in my folders... :oops: sorry for being so uninformed!
Reply
#5
The source code is in "[filename].bas" where [filename] is the name of your program- however, it may be in a faster, binary, QBasic format. If this is the case, you will need to go into the Save As dialog and make sure the "text" radiobutton is checked.
QBRun is brun45 in QB 4.5, by the way.
In the beginning, there is darkness – the emptiness of a matrix waiting for the light. Then a single photon flares into existence. Then another. Soon, thousands more. Optronic pathways connect, subroutines emerge from the chaos, and a holographic consciousness is born." -The Doctor
Reply
#6
Skyler: Thanks for catching my error!

EclipseOTO: Please try again, using the correct name for the executable, which, as Skyler points out, is BRUN45.exe
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#7
Alright, forgive me, but im still not sure about any of this... the name of the file is SPWRITER.BAS. I've tried running this with Brun45 as well as saving the file as SPWRITER.EXE. Unfortunately I can't seem to figure out how to open the .exe version with Brun45... As well as this I can't find the '"text radiobutton" in the Save as dialog. Sorry, and thanks!
Reply
#8
Skyler means, click on RUN, select Make Exe File, then select either "EXE Requiring BRUN45.EXE" or "Stand-Alone EXE File", then "Make EXE".

By the way, I have two BAS files in my QB directory. I can run both from within QuickBASIC 4.5, but, when I compiled them as stnd-alone exe files, one runs, the other exhibits the problem you are describing, a DOS screen appears for a second, then the program closes. The same thing happened when I compiled as "EXE Requiring BRUN45.EXE". So, I am now going to investigate this fenomenon further.
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#9
This is what I found, for my case.
I entered, as the final line:
Code:
WHILE INKEY$ = "":WEND
Now, my compiled program runs fine, either as a stand-alone or requiring BRUN45.exe.

The program was, apparently, running lightning fast and closing on terminating. By adding the one line of code above, it now stops, until one presses any key, then it terminates and closes.

Does the above fix your problem?
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#10
Quote:Skyler means, click on RUN, select Make Exe File, then select either "EXE Requiring BRUN45.EXE" or "Stand-Alone EXE File", then "Make EXE".

By the way, I have two BAS files in my QB directory. I can run both from within QuickBASIC 4.5, but, when I compiled them as stnd-alone exe files, one runs, the other exhibits the problem you are describing, a DOS screen appears for a second, then the program closes. The same thing happened when I compiled as "EXE Requiring BRUN45.EXE". So, I am now going to investigate this fenomenon further.
Don't use the compile option "EXE Requiring BRUN45.EXE". Don't waste your time with it. Use the "Standalone EXE" option.

Years ago, when your application had many programs, the BRUN45.EXE option created smaller EXE files but needed the BRUN45 to run. Nowadays, the saving in program EXE space is negligible, and this BRUN45 option is virtually obsolete.

Standalone EXE programs are always better.
*****
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)