Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Having trouble understanding how to download FreeBasic.
#11
1) Go to command line
2) find your way to the freebasic dir
3) type fbc
4) that is the compiler. it has switches and stuff, you can make a bas file and then compile it with fbc.
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#12
For example:
Code:
cd the\directory\that\fbc.exe\is\in
edit myBasFile.bas
fbc myBasFile.bas
myBasFile.exe
Reply
#13
That's what I do to install last FreeBASIC version:

1.- Download it from sourceforge. Moneo: as mentioned, Sourceforge works perfectly and you are getting problems 'cause you have spyware in you system that doesn't let you browse normally. Sourceforge, as mentioned as well, is mirrored in many places. That means that the files hosted by sourceforge are copied to different servers in different locations. As sourceforge has a huge volume of downloading, that's done so if you can't download from a server, you can try another.

2.- Once downloaded, unpack it respecting directory structure. This is very important.

3.- Then I set up my path system variable. I add <fB dir>, <fB dir>\inc, <fB dir>\bin, <fB dir>\lib to the system path. As I don't like to bloat my system variables, I make this using a BAT file which I call before I'm going to work with the compiler:

Code:
@echo off
set path=%path%;c:\freeBASIC;c:\freeBASIC\inc;c:\freeBASIC\lib;c:\freeBASIC\bin

That way I can call fbc from anywhere.

4.- Now I'm ready to go. I go to my program's folder, and call the compiler from there. fbc is very easy to use and a fbc without parameters shows a list of them. But most of the time it will be just a matter of:

Code:
fbc myprog.bas

Which will compile myprog.bas into myprog.o and then link it to the RTL producing myprog.exe, all automaticly. You have switches to stop the process at the creation of the .o file and stuff like that.

To compile a project with several bas files you just do:

Code:
fbc mainmodule.bas secondmodule.bas thirdmodule.bas

To include a library file:

Code:
fbc mainmodule.bas secondmodule.bas -l library1.a

etcetera. Mind you that this is a 32 bits compiler so old libraries written for 16 bits DOS (i.e. .LIBs used with QB) won't work.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#14
Whitey, Sterling, Nathan,

You all mention operating from the MSDOS command-line.

I thought this was the version that runs under Windows, and therefore did not use or need MSDOS.

Do I have the wrong version? Do I have the Windows version or the 32 bit MSDOS version? How can I tell the difference?

The reason I want the Windows version is because at work they have inhibited PC's from using MSDOS; that is, you can't get to the command-line, period. If you try to run a DOS program directly, you get an error message saying that 16 bit programs are not allowed. I'm sure other companies have done the same for security reasons.
*****
Reply
#15
If there is "win32" in the name of the file you downloaded, it's the Windows version. Even the Windows version of fbc.exe is text only, like a DOS program.

Here's an alternative way to use it:
1. create a .bas file
2. drag the .bas file on to fbc.exe
an exe should appear.

The problem with this method is that if fbc couldn't compile it for some reason, you won't know why. Normally it would PRINT something to explain what's wrong, but you won't see that.

To use it properly (and not miss out on error messages) you're going to need either an IDE or the command prompt.
Reply
#16
Moneo, why don't you want to use an IDE? I've found Von Godric's FB-IDE to be more than ample. Wink
Reply
#17
Quote:Moneo, why don't you want to use an IDE? I've found Von Godric's FB-IDE to be more than ample.

Exactly.

Oh, and, if the compiler is command line, it means that you have to run it from DOS, otherwise you won't be able to specify stuff. It's not that hard, once you get used to it.

And it isn't a DOS application, actually. It's a WIN32 console application, which means that it won't run on standalone DOS. It has to have Windows with it.

So that's why if you do PRINT in your programs without doing SCREEN first, it opens a DOS window Smile.
.14159265358979323846264338327950288419716939937510582709445
Glarplesnarkleflibbertygibbertygarbethparkentalelelangathaffendoinkadonkeydingdonkaspamahedron.
Reply
#18
Quote:If there is "win32" in the name of the file you downloaded, it's the Windows version. Even the Windows version of fbc.exe is text only, like a DOS program.

Here's an alternative way to use it:
1. create a .bas file
2. drag the .bas file on to fbc.exe
an exe should appear.

The problem with this method is that if fbc couldn't compile it for some reason, you won't know why. Normally it would PRINT something to explain what's wrong, but you won't see that.

To use it properly (and not miss out on error messages) you're going to need either an IDE or the command prompt.

Sterling, Yes the name of the zip file was:
freeBAsic-v0.11b-win32.zip

I agree that the alternate way to compile is no good.

Ok, so how do I get into the IDE?

As always, Sterling, I appreciate your help.
*****
Reply
#19
Quote:
Quote:Moneo, why don't you want to use an IDE? I've found Von Godric's FB-IDE to be more than ample.

Exactly.

Oh, and, if the compiler is command line, it means that you have to run it from DOS, otherwise you won't be able to specify stuff. It's not that hard, once you get used to it.

And it isn't a DOS application, actually. It's a WIN32 console application, which means that it won't run on standalone DOS. It has to have Windows with it.

So that's why if you do PRINT in your programs without doing SCREEN first, it opens a DOS window Smile.

DR.,
I have had bad experiences with IDE's. When something doesn't work right, you don't know if it's your program or some weirdness in the IDE.

THEGROGEN,
* Can I compile and get an executable using the IDE? Or will I have to run in emulation mode, which I don't want?

* By using the IDE, can I avoid MSDOS and the command-line alltogether?

* About doing a PRINT command: does that mean that the PRINT doesn't work like in normal Basic? What kind of a SCREEN command are you referring to?

Thanks.
*****
Reply
#20
This is the newest version of the IDE, plus the newest version of the compiler...

http://www.hot.ee/fbide/FBIde33a+FBC012.exe

I have found 0 critical faults with this package... unless it was my fault, but that doesn't count! :lol:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)