How do I run Freebasic?
How do I run Freebasic?
I have downloaded freebasic for windows. When I click on the icon I get
what looks like DOS. What do I do next? Where do I enter source code?
I am a very raw beginner and know nothing about DOS.
what looks like DOS. What do I do next? Where do I enter source code?
I am a very raw beginner and know nothing about DOS.
You have to run the FreeBasicCompiler just to build an executable file from your source code.
You type your source code in a normal text-file with the specific file-extension ".bas". You could use every text-editor to write the code, but I suggest using an IDE like FBedit or FBide.
If you use a normal text-editor you have to open command-prompt (cmd.exe on Win NT (2k, XP, Vista, 7, ...); command.com on Win9x (95, 98, Me)) and run the FreeBasic Compiler with the source-code file as Parameter.
If you've installed FreeBasic with the Installer you've a shortcut to command-prompt on your Desktop and in your Start-menu.
Run the command-prompt, change to the FreeBasic Compiler Directory (if you don't use the Shortcut created by FreeBasic Installer) and type if your source-code is located in the file "myProg.bas".
Type "fbc" (without quotes) to get a list and a short description of the different options that are possible (for example to create a GUI application, use QuickBasic compatibility mode, ...).
____________________________
As mentioned above I'd suggest using an IDE (Integrated Development Environment) that runs the Compiler for you so that you don't have to open command-prompt (console window).
FBedit is a great IDE. Get it at http://radasm.cherrytree.at/fbedit/
Using FBedit you've to enter your Path to the FreeBasicCompiler (fbc.exe) just once and you can easily compile your files with a simple click on the compile-button.
You type your source code in a normal text-file with the specific file-extension ".bas". You could use every text-editor to write the code, but I suggest using an IDE like FBedit or FBide.
If you use a normal text-editor you have to open command-prompt (cmd.exe on Win NT (2k, XP, Vista, 7, ...); command.com on Win9x (95, 98, Me)) and run the FreeBasic Compiler with the source-code file as Parameter.
If you've installed FreeBasic with the Installer you've a shortcut to command-prompt on your Desktop and in your Start-menu.
Run the command-prompt, change to the FreeBasic Compiler Directory (if you don't use the Shortcut created by FreeBasic Installer) and type
Code: Select all
fbc "myProg.bas"
Type "fbc" (without quotes) to get a list and a short description of the different options that are possible (for example to create a GUI application, use QuickBasic compatibility mode, ...).
____________________________
As mentioned above I'd suggest using an IDE (Integrated Development Environment) that runs the Compiler for you so that you don't have to open command-prompt (console window).
FBedit is a great IDE. Get it at http://radasm.cherrytree.at/fbedit/
Using FBedit you've to enter your Path to the FreeBasicCompiler (fbc.exe) just once and you can easily compile your files with a simple click on the compile-button.
-
- Site Admin
- Posts: 6323
- Joined: Jul 05, 2005 17:32
- Location: Manchester, Lancs
using FREEBASIC
I am teaching the fundamentals of programming to a group of 6th graders in TX. I have Just Basic, a new QBASIC (that only runs in a small window) and now I have downloaded FREEBASIC. I am more than a little confused on how one gets this to work.
1. I installed the program
2.When I select the desktop short cut with my xp platform, I end up with a small window what displays the free basic path
3. there are no directions on how to run a program, input a program, the samples are displayed as BMP's and nothing seems to wrok
4. I tried the most basic of all programs:
print "hello"
Then I tried selecting enter, pressing F5 etc and could not get the program to work. Could someone tell me or refer me to a site or location where I can get this to work?
Thanks
1. I installed the program
2.When I select the desktop short cut with my xp platform, I end up with a small window what displays the free basic path
3. there are no directions on how to run a program, input a program, the samples are displayed as BMP's and nothing seems to wrok
4. I tried the most basic of all programs:
print "hello"
Then I tried selecting enter, pressing F5 etc and could not get the program to work. Could someone tell me or refer me to a site or location where I can get this to work?
Thanks
Hello MMAN!
FreeBASIC is a BASIC compiler. That means you feed it a BASIC source code file and it outputs an EXE file. There are no facilities for editing your file. You must do that in a text editor or use one of the many code editors that are available. My personal favorite is FBEdit which you can find here...
http://www.freebasic.net/forum/viewtopi ... ght=fbedit
Once installed FBEdit allows you to edit your source code and organize files into projects. Then when you press compile, FBEdit calls the FreeBASIC compiler and passes the names of the source code files for compilation, returning any errors found.
It may take a little work getting FBEdit configured and making sure all the PATH variables are pointing to all the correct places, but it is well worth it.
I personally put together an installer for Windows that comes with FBEdit and FreeBASIC pre-configured. The version of FBEdit is not current but still works well. You can get that here...
FreeBASIC & FBEdit Installer
Hope that helps...
-Vince
FreeBASIC is a BASIC compiler. That means you feed it a BASIC source code file and it outputs an EXE file. There are no facilities for editing your file. You must do that in a text editor or use one of the many code editors that are available. My personal favorite is FBEdit which you can find here...
http://www.freebasic.net/forum/viewtopi ... ght=fbedit
Once installed FBEdit allows you to edit your source code and organize files into projects. Then when you press compile, FBEdit calls the FreeBASIC compiler and passes the names of the source code files for compilation, returning any errors found.
It may take a little work getting FBEdit configured and making sure all the PATH variables are pointing to all the correct places, but it is well worth it.
I personally put together an installer for Windows that comes with FBEdit and FreeBASIC pre-configured. The version of FBEdit is not current but still works well. You can get that here...
FreeBASIC & FBEdit Installer
Hope that helps...
-Vince
how do i
Switches
to hide the dos box (console) that sits in the background
run this program start_shell.exe. This opens a black dos box
then type
fbc -s gui myprog.bas
(this is the switch yo use if you have the windows version of fbide.exe)
(check your paths are correct)
the screen command means your program opens in a new separate window defined by you.
My example hello world program
'$lang:"qb"
screen 19
cls
print "hello world"
sleep
:note the '$lang:"qb" line one of my program code
this sets the compiler to quick basic compatibility mode which is useful if you come from that version
fbide.exe can compile some other variations of basic too
to hide the dos box (console) that sits in the background
run this program start_shell.exe. This opens a black dos box
then type
fbc -s gui myprog.bas
(this is the switch yo use if you have the windows version of fbide.exe)
(check your paths are correct)
the screen command means your program opens in a new separate window defined by you.
My example hello world program
'$lang:"qb"
screen 19
cls
print "hello world"
sleep
:note the '$lang:"qb" line one of my program code
this sets the compiler to quick basic compatibility mode which is useful if you come from that version
fbide.exe can compile some other variations of basic too
-
- Posts: 2655
- Joined: Aug 28, 2008 10:54
- Location: new york
Q: "All I get is a flashing black box..."
A:
1. Download this: http://prdownloads.sourceforge.net/fbid ... e?download
2. Install it
3. Run it
4. Load your hello.bas prog into it
5. Hit F-5 to compile
hello.bas
...
(People seem to find this helpful+FB-Ide is more QBasic like than FBEdit)
*Edit: Set so that people do not download the old bundle with FB .15
A:
1. Download this: http://prdownloads.sourceforge.net/fbid ... e?download
2. Install it
3. Run it
4. Load your hello.bas prog into it
5. Hit F-5 to compile
hello.bas
Code: Select all
print "Hello World"
sleep
(People seem to find this helpful+FB-Ide is more QBasic like than FBEdit)
*Edit: Set so that people do not download the old bundle with FB .15
Re: How do I run Freebasic?
Hello Oldnet.
FreeBASIC being a compiler and not an IDE you need to use a software to write your code in FreeBASIC.
So first of all you have to get a suitable software for writing the source code:
Geany
FBEdit
GEdit
Notepad
Once you have written your code you have to save it in a file with .BAS extension
Example:
myprog.bas
Importantly, if you don't use the FreeBASIC shell I suggest you create a script in BAT CMD or SH with the compile command
Windows and DOS:
Code: Select all
fbc myprog.bas
defalut vaule for Windows:
c:\Programs\FreeBASIC\bin
default command for autoexec.bat for DOS:
PATH = %PATH%;C:\FreeBASIC\bin
Re: How do I run Freebasic?
Hey team! I'm an all-around massive newb in programming right now, I stumbled across the forum and thought ''why not?'' so here I am.
This thread was really helpful in getting me started! I'll be sure to ask around for more help to better understand just what I'm doing here
This thread was really helpful in getting me started! I'll be sure to ask around for more help to better understand just what I'm doing here
Re: How do I run Freebasic?
Welcome. Make sure you have the latest official release (1.09.0). Also, try to look out if there's already an answer to any inquiry you might have. Have fun
Re: How do I run Freebasic?
would this be where I can find the latest version? https://freebasic.en.softonic.com/
Re: How do I run Freebasic?
You always have them here, in this very forum (under 'The DOWNLOADS you are MOST LIKELY looking for...'):Andrew92 wrote: ↑May 27, 2022 17:11 would this be where I can find the latest version? https://freebasic.en.softonic.com/
viewforum.php?f=1
Re: How do I run Freebasic?
Thank you so much! I'll get on thispaul doe wrote: ↑May 27, 2022 17:15You always have them here, in this very forum (under 'The DOWNLOADS you are MOST LIKELY looking for...'):Andrew92 wrote: ↑May 27, 2022 17:11 would this be where I can find the latest version? https://freebasic.en.softonic.com/
viewforum.php?f=1
Re: How do I run Freebasic?
If you also plan to use other platforms like Linux, I recommend Geany as IDE, because of the availability of binaries in Windows, MacOS and Linux. And if you're getting more experienced, the source is available too, in order to compile it into other platforms. Then all is looking about the same in the different systems.
It's important to know websites like Softonic modify the software, in most cases adding ads and other software you likely wouldn't like.Andrew92 wrote: ↑May 27, 2022 17:11 would this be where I can find the latest version? https://freebasic.en.softonic.com/