Compiling

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
Raspberrypicker
Veteran
Posts: 55
Joined: Thu Aug 02, 2007 4:54 pm
Location: Florida

Compiling

Post by Raspberrypicker »

What exactly does it mean to compile a program?
And how would I go about doing this?
Fruit Pickin'
D.S
Coder
Posts: 38
Joined: Wed Sep 14, 2005 7:37 am

Post by D.S »

What is it:
Someone else can probably give a better answer, but essencially, it means to turn your program from QB code (or any other language) into a format that the machine can read. Practically, from a QB coder's standpoint, it means to make your program into a .exe file, so you don't have to go through Qbasic to run your program (there are other advantages to making your program into an .exe file, such as speed and easier file access).

How to do it:
Download Qb 4.5. It has an option in the 'run' menu to make an .exe file. Just click that, and you've compiled your program! Lots easier than in C or another such language.

Also note that it annoys the death out of people like me when I download something that isn't compiled. Sometimes there are unforseen problems that would have been fixed if they just compiled it.
User avatar
Raspberrypicker
Veteran
Posts: 55
Joined: Thu Aug 02, 2007 4:54 pm
Location: Florida

Post by Raspberrypicker »

seems pretty simple.

only reason i ask is because I want to implement scrolling into my games, so compiling will make it run smoother.

Thanks
Fruit Pickin'
bungytheworm
Veteran
Posts: 288
Joined: Sat Feb 18, 2006 4:02 pm

Post by bungytheworm »

D.S wrote:Also note that it annoys the death out of people like me when I download something that isn't compiled. Sometimes there are unforseen problems that would have been fixed if they just compiled it.
But there is also lot's of peoples who dont like to download/run .exe files so easily, like me ;) So if there is no _real_ reason to offer .exe only, include sources in package too.
Mac
Veteran
Posts: 151
Joined: Mon Aug 06, 2007 2:00 pm

Right

Post by Mac »

E.K.Virtanen wrote:
D.S wrote:Also note that it annoys the death out of people like me when I download something that isn't compiled. Sometimes there are unforseen problems that would have been fixed if they just compiled it.
But there is also lot's of peoples who dont like to download/run .exe files so easily, like me ;) So if there is no _real_ reason to offer .exe only, include sources in package too.
Right!!

And to D.S. I would add that what annoys me is people posting code that has not been run in QBasic. They just code directly on the forum input screen. All code should be entered into QBasic and run and then copied from there to the forum so we get code that at least runs, even if there are bugs. But compiling isn't the way to go. Actually running the program, which doesn't require a compile, is the way to go.

Never post an EXE. Nobody in their right mind will run it.

By the way, to the OP, EXE's don't necessarily run smoother. You have to alter your program. I have seen interesting programs like Bob Seguin's King Kong and Miniature Golf that run great in ordinary QB1.0 uncompiled mode. Compiling only helps in certain severe cases, such as computing the first zillion prime numbers.

Mac
User avatar
Raspberrypicker
Veteran
Posts: 55
Joined: Thu Aug 02, 2007 4:54 pm
Location: Florida

Post by Raspberrypicker »

about qb 4.5

1. Do i have to pay for it?
2. Is it illegal to download from the internet?
3. Why is it illegal to download it for free if Microsoft doesn't sell this product anymore?
Fruit Pickin'
Mac
Veteran
Posts: 151
Joined: Mon Aug 06, 2007 2:00 pm

Post by Mac »

Raspberrypicker wrote:about qb 4.5

1. Do i have to pay for it?
2. Is it illegal to download from the internet?
3. Why is it illegal to download it for free if Microsoft doesn't sell this product anymore?
1) No
2) Maybe technically, yes, but in actual fact, no. I've heard in Massachusetts or some state, it is illegal for a married couple to use a condom for birth control. Maybe so, but nobody in our lifetime will be put in prison for that. Same with QB4.5. Nobody will ever be penalized for downloading and using it.
3) Because they simply refuse to make it public domain. Why? I don't know. Why should they? What's in it for them? So they don't.

If I had a house that I didn't care about any more and you wanted to live there, then do it. Why don't I simply give you the house? Who knows? I just don't feel like it. But if I never plan to enforce, then live there all you want.

It's strange, but that's the way it is. QB4.5 is, for all practical matters, free and open for download by whoever wants. If it has problems and causes you damage, don't sue Microsoft. That's the real reason.

Mac
User avatar
Raspberrypicker
Veteran
Posts: 55
Joined: Thu Aug 02, 2007 4:54 pm
Location: Florida

Post by Raspberrypicker »

Mac wrote: it is illegal for a married couple to use a condom for birth control.
I heard something like that too where if you slurp soup in a restaurant in New Jersey you will get fined.

thanx for the info :)
Fruit Pickin'
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

The best thing to do is to develop your application in QB 4.5 and then distribute the sourcecode and, if applicable, the libraries for it...if you or others are paranoid about running an EXE, which is rather foolish anyways. If "nobody in their right mind will run it", then the vast majority of QB gamers must be left-brained. :P (Mac, what kind of sickos do you hang out with?) If I were to make a QB game nowadays, there's no way in hell I'd distribute it in source only form; it's gotta be ready-to-go out-of-the-box, so to speak. And there's no way I'd really care to take the time to compile someone else's program.

And yes, almost all of the time, it's going to run faster compiled. The interpreter is just that; an interpreter. It's virtually always going to be slower than compiled code. Also, when you compile a QB 4.5 program, there are a couple of advantages you can utilize, such as the unsigned integer calculation trick, or the "ffix" floating point optimization.
QBPerson
Newbie
Posts: 1
Joined: Thu Oct 04, 2007 2:41 am

Post by QBPerson »

You could also use <A>VBDOS</A>!
Last edited by QBPerson on Thu Jul 24, 2008 11:59 pm, edited 1 time in total.
iamdenteddisk
Veteran
Posts: 185
Joined: Mon Jun 30, 2008 4:10 pm

why qb isnt sold but isnt publicdomain

Post by iamdenteddisk »

imagine a company who makes anything that goes out of date like food/software

if and when it dose go bad it seems worthless as a product ,but if i just let anyone have it it isnt worthless but unproffitable.

if you steal it ,it is a business loss and can be reimbursed /insured. wich makes it still profitable.

if you steal by makeing a copy of it without stealing the original it never depreciates as a loss and remains a stable income.at the same time it is then a "circumstance without a whitness or evidence" wich is not punnishable as a crime unless you "admitt to it or produce the copy" in court as evidence. anyone doing this should be educated on meranda.

"anything you say or do can and will be used agianst you"
and also know their 5th amendment wright.
"not to answer a question on the grounds that it may increminate you"

meaning if you steal software
1 it helps the manufacture who has insurance.
2 you have the evidence not them.
3 dont be dumb.

the thing is the insurance company cant press charges only the manufacture. now if it is known that the manufacture is allowing you to steal from them it is embesalment and insurance fraud so they get into hot water if you do as an incentive to press charges .but then most company's prefer to retain this for"discharge of ceo" purposes as oposed to chargeing the joe public for millions in losses with no evidence.
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

Those posts were from 2007! Why BOTHER? Thread is DEAD!

It's like talking to yourself silly.............
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Post Reply