Need a little help

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
Limond

Need a little help

Post by Limond »

I am working on a program, and i have most of it done except i don't know how to make it into an actual program. (Such as where i just click a short cut and my program pops up.)

Any help would be appreciated. Thanks in Advanced
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

If u wanna make a .exe...

Post by {Nathan} »

there is actully 2 ways. the first way is to get a copy of qb 4.x or PDS. then, run, make exe in the definations thingy just hit enter. if it dosnt have a error then ur good. but yes, there is always a but, that does not always work. some programs, cant be compiled, and i have no clue why, so ask some1 else :wink: wut u gotta do is make a .bat file. once u made it, do this:

qb /l (enter ur lib, if u use one) /run (program name)

note: the whole /l thing is only if u use a lib. if u use relib, then put a /ah in it too. run the .bat, and ur all done! but, the second way makes ur exes WAY bigger, so strive for the first one!!! hope that helps!!!![/i]
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

I've never seen a program that can't be compiled using PDS 7.1

Either from inside the IDE, or from the commandline.




If you are using QB45, or PDS 71 (QB71) then you do:

Run -> Make EXE: Enter your options, make sure to select: Stand Alone EXE. Press Ok...

Now there will be an EXE in your current folder, which is your compiled program.
Limond

Post by Limond »

im new to Qbasic so i dont really understand what both of you just said. I want to try the 2nd option of what nathan said. I am doing this for school, and for the summer homework, they just gave me a packet but it doesn't tell you how to do it. It is like the complete basics. So it would be nice if you could simplify it a bit.

Thanks in Advance.
Limond

Post by Limond »

Sorry about the double post but can u also explain, how to find what version of Qbasic you have, the school gave me a disc, with it.

And Explain the first method of making it work please.

Thanks in advance.
User avatar
Pete
Site Admin
Posts: 887
Joined: Sun Dec 07, 2003 9:10 pm
Location: Candor, NY
Contact:

Post by Pete »

Chances are your school gave you the freeware version of QB, QBasic version 1.1. This is a stripped down version of QuickBasic that is unable to make executable programs.

You will need to download another version of QuickBasic, such as v4.0, v4.5 or PDS v7.1. All of them are able to make stand-alone .exe programs.

You can download them at many places on the Internet. I'd suggest this site: http://www.download-qb.tk/

Once you have the right version of QB, compiling it is just a matter of selecting an option from the menu. It should be pretty obvious what to do.
matt2jones

if your school only game you qb1.1

Post by matt2jones »

if your school only game you qb1.1 its unlikely they want you to compile it, so just give them the .bas file, along with any external files you may be using, and they should accept it.

To run an uncompiled Qbasic file like a real program you can do this:

copy qbasic.exe into the same folder that the file is in.

Open notepad, and type:

Code: Select all

qbasic /run <the name of your program>
and save the file with the ".bat" extention. (eg. If your program was called "game.bas" you would call the .bat file "game.bat")

Now by double clicking on the .bat file, your program should run.

NOTE: When using this method you should replace the END statement (the stops your program when its finished) to SYSTEM, otherwise when your program is finished executing it will return to qbasic, instead of windows/dos.

You can download QB45 from gbgames.com, and you can compile your programs to exe's with that. But I recoment using the above method for a few months until you're familiar with it before you have to deal with compiling & linking libraries.

matt
Anonymous

Post by Anonymous »

matt2jones wrote:But I recommend using the above method for a few months until you're familiar with it before you have to deal with compiling & linking libraries.
And until you know for certain that your teachers allow you to program in QB45. It may happen some times that teachers only accept programs made in the IDE they gave to the students.
Limond

Post by Limond »

What im doing isnt required for school im just trying to get so me advice and tips and what not. I know how to compile and everything now but when ever i try to type in (INPUT "Enter any Number"; A) It comes up as an error. The "Enter any Number" is higlighted and says thats where the error is. I dont know whats wrong. Sorry i cant give the exact error cause im at school right now and dont have access to it.
Anonymous

Post by Anonymous »

Hmn. Sounds strange :roll: It normally shouldn't happen...
Post Reply