What is a good IDE for Freebasic on Linux?

Linux specific questions.
Post Reply
BristolBrick
Posts: 36
Joined: Feb 24, 2016 3:34
Location: Australia

What is a good IDE for Freebasic on Linux?

Post by BristolBrick »

I've been programming on Windows in Reebasic for years, always with FBIde. Now that I must use Linux, and FBIde doesn't support it, what would be a good one for Linux?
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: What is a good IDE for Freebasic on Linux?

Post by srvaldez »

Hi BristolBrick
I use geany on linux, it works out of the box with Freebasic, there are a couple thing to keep in mind coming from FBide, there's no compile-and-run command, you must compile and then after a successful compile, run the program, also you must save your FB code with bas extension before you can compile.
I suggest that you also give Poseidon IDE a try, it might be more to your liking
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: What is a good IDE for Freebasic on Linux?

Post by TJF »

srvaldez wrote:... there are a couple thing to keep in mind coming from FBide, there's no compile-and-run command, you must compile and then after a successful compile, run the program, also you must save your FB code with bas extension before you can compile.
You can customize the build commands (menu: Build -> Commands). Click on a button in the first column and name your entry. Then add your context
  • command: fbc -exx -w all "%f" && "./%e"
  • folder: "%d"
and Geany will compile and start by a single keystroke. (Note: the && makes the second command only start when the first one succeeded [= returns Null].)

And by editing the configuration files (menu Tools -> Config files) you can make Geany invoking the fbc for any custom file extension. But it's best practise to use the standard '.bas' extension.

@BristolBrick

I never tried Poseidon, because it doesn't meet my needs. The 'custom command' feature is unique in Geany. I use it very often.

Regards
badidea
Posts: 2586
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: What is a good IDE for Freebasic on Linux?

Post by badidea »

Geany offers you anything you can wish for :-)
There are multiple topics on Geany, e.g.: Using Geany in Linux - Screen shot plz
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: What is a good IDE for Freebasic on Linux?

Post by srvaldez »

when I said that you have to save your FB code with a bas extension before you can compile, I was referring to the FBide feature that allows you to compile and run code that's in the editor without being saved to a file, FBide saves the code to a temp file, compiles and then executes the temp.exe, it's handy if you want to tryout a snippet of code, but that feature is not available in geany probably because geany is a multi-compiler IDE and it needs to know which compiler to invoke which is determined by the file extension.
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: What is a good IDE for Freebasic on Linux?

Post by TJF »

srvaldez wrote:when I said that you have to save your FB code with a bas extension before you can compile, I was referring to the FBide feature that allows you to compile and run code that's in the editor without being saved to a file, FBide saves the code to a temp file, compiles and then executes the temp.exe, it's handy if you want to tryout a snippet of code, but that feature is not available in geany probably because geany is a multi-compiler IDE and it needs to know which compiler to invoke which is determined by the file extension.
You can invoke fbc as a custom command, compiling code from standard input pipe. In that case you've to mark all (or just a part of the) code in Geany and send it to fbc console input (no temp file), in order to create a temp executable, which you can start in the same custom command.

But in that case all gets lost when the IDE closes (ie. power loss). IMHO it's better to always create a source file by starting the IDE in a terminal like

Code: Select all

touch tmp.bas && geany tmp.bas
or you invoke like

Code: Select all

geany tmp.bas
and Geany saves the code from the new tab before the next compiling.
badidea
Posts: 2586
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: What is a good IDE for Freebasic on Linux?

Post by badidea »

For the 'Geany quick run' issue, I have one 'test.bas' file on the Desktop. I open that one paste the code into it and run. Sometimes however 'test.bas' contains something useful that I don't want to lose, and things become a bit more complicated.
exagonx
Posts: 314
Joined: Mar 20, 2009 17:03
Location: Italy
Contact:

Re: What is a good IDE for Freebasic on Linux?

Post by exagonx »

badidea wrote:For the 'Geany quick run' issue, I have one 'test.bas' file on the Desktop. I open that one paste the code into it and run. Sometimes however 'test.bas' contains something useful that I don't want to lose, and things become a bit more complicated.
I used Geany and I have no problem with compiling and runnig, i think is the best IDE for FreeBASIC
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

Re: What is a good IDE for Freebasic on Linux?

Post by speedfixer »

Love geany. Small, fast, simple. I ALWAYS start with a file where I want with the name I want. (Of course, I have scripts that open from 3 to 80 files at once on 8 desktops. Learning to script is like discovering that pizza can be made to your custom tastes AND delivered to your door!)

I also use a 'test.bas' on my desktop. A code snippet an be tested quickly.
A little discipline and you learn to make your own FB/samples directory to put your bizarre test code into immediately.

Then I can learn to avoid making the same mistake over and over because of learning interference. (Well, that's the hope.)

david
Post Reply