Page 1 of 1

Need a little help

Posted: Sat Aug 28, 2004 7:54 am
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

If u wanna make a .exe...

Posted: Sat Aug 28, 2004 8:11 am
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]

Posted: Sat Aug 28, 2004 8:59 am
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.

Posted: Sat Aug 28, 2004 9:26 am
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.

Posted: Sat Aug 28, 2004 9:32 am
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.

Posted: Sat Aug 28, 2004 2:21 pm
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.

if your school only game you qb1.1

Posted: Sun Aug 29, 2004 9:59 am
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

Posted: Tue Aug 31, 2004 6:52 am
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.

Posted: Tue Aug 31, 2004 10:29 am
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.

Posted: Wed Sep 01, 2004 7:32 am
by Anonymous
Hmn. Sounds strange :roll: It normally shouldn't happen...