Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FreeBasic Help
#1
I took some advive and decided to try and learn FreeBasic, I have downloaded the compiler etc. but cannot get the examples to work or cannot make my own programs, I understand that it is only a FreeBasic compiler and was wandering who you go about making your own programs with FreeBasic.

Please Help
Reply
#2
`fbc filename.bas` produces 'filename.exe'

You'll need to use the command prompt or set up some Windows file associations to compile freeBASIC programs (or use vongodric's ide).
Reply
#3
Ok, I have downloaded the FBide but cannot figure out how to set it up, especially the syntax something or other but I do want to get it working as this project is a very good thing.
Reply
#4
Here's what I did and it works great. Install your FreeBASIC and then install the IDE to that folder. Once you've installed the IDE, I'd check the config file there to make sure the paths are set right, though I don't actually use the IDE to compile (there are still some kinks I believe). Anyways, get that going fine and then open up the IDE. Open up whatever example program you want or make your own quick program. To compile, I just click on Run->CMD Promt (misspelled for the time being) and type out the following:

cd.. (to get to the FBC directory)
fbc <.bas file> -e -g

(if the .bas file is in another directory, like the hello example, you'll wanna include the directory: fbc examples/hello.bas)

The latter two give error checking/debug info that will point you to what line you've screwed up in the source. Once that compiles, just type in the name of the .exe (which will default to the name of the .bas file you compiled). I just save my .bas files in the main fbc directory so I don't have to fool with directory names and changes.

If that doesn't work.. I'm not sure what you're doing. :wink:
Reply
#5
I did what you said and it worked great for the hello.bas but I couldn't get it to work for some of the others, should a window like qbasic be coming up with the code in it.
Reply
#6
I don't think ComDriver gets the point that fbc is a commandline compiler and has no built-in IDE...
I'd knock on wood, but my desk is particle board.
Reply
#7
ComDriver: fbc.exe doesn't let you edit or even look at your program, and it doesn't show a window. There's a separate program you can get for that call an IDE. There are 2, that I know of, being written to work with FreeBASIC. An IDE will be more familiar - a window where you can edit and test your code.
Reply
#8
Make that three...
[Image: fido-mainview.png]
:bounce:
I'd knock on wood, but my desk is particle board.
Reply
#9
Yes, I know that FBc is just a compiler but whenever I run a program using the command line a screen like Qbasic's creen cmes up. I know I'm slow but I really want to learn FreeBasic could someone please help.
Reply
#10
a screen like Qbasic is coming up that make no sence if your at command line then all you should see is a black box with C promt and from there you go fbc test.bas which will produce test.exe unless there error's in the source then the compiler will send back the error and the linenumber that error is at.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)