FreeBASIC and the Raspberry Pi ?
Re: FreeBASIC and the Raspberry Pi ?
@BasicCoder2
Are you using the hello.bas that is in the examples folder? If not, I think you need to have a sleep, in the code, to keep the program running.
Are you using the hello.bas that is in the examples folder? If not, I think you need to have a sleep, in the code, to keep the program running.
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
The version that came with Raspian does show F5 as a hot key for the menu Build -> Execute itemsrvaldez wrote:geany does not have a quick run F5, you must compile then run your program.
However Build/Execute (F5) just pops up a geany_run_script_5ZLBGZ.sh titled window
Every time I Build/Execute it comes up with another run_script window with a different combination of letters and numbers in the title.
Clearly I need to read a geany tutorial.
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
Yes I am using hello.bas and it does have a sleep command.dasyar wrote:Are you using the hello.bas that is in the examples folder? If not, I think you need to have a sleep, in the code, to keep the program running.
The program does not compile and run it just compiles. I don't know how to make it run. The Execute command just pops up a window (see previous post). Perhaps another editor would be better to use. I see FBIDE which I use in MSWindows also works in Linux. It is just a matter of figuring out how to configure it with fbc as that was done automatically when I downloaded the FBIDE/FreeBASIC combo for Windows. I don't know enough about how Linux works yet.
Re: FreeBASIC and the Raspberry Pi ?
I just checked to see how a hello.bas works with my setup and Geany, it seems to work as expected. Just to be on the safe side do:
sudo apt-get update
sudo apt-get install geany
The one thing that I noticed with my setup is that the fbc install does not have an examples folder, and I noticed that it seems like the include folder does not contain all of the .bi files, but I could be wrong on this.
I was kind of hoping that FreeBasic would have an official Raspberry Pi install package.
sudo apt-get update
sudo apt-get install geany
The one thing that I noticed with my setup is that the fbc install does not have an examples folder, and I noticed that it seems like the include folder does not contain all of the .bi files, but I could be wrong on this.
I was kind of hoping that FreeBasic would have an official Raspberry Pi install package.
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
In the folder that you compiled the hello.bas program, there should be two files, the hello.bas and hello(executable file). Double click on the hello file, there should be another window that opens up, asking how to run it, choose the terminal window.
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
@dasyar,
That worked thanks. A graphic example also worked.
Much rather run a program from the IDE however as it is a bit tedious going via the File Manager.
That worked thanks. A graphic example also worked.
Much rather run a program from the IDE however as it is a bit tedious going via the File Manager.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: FreeBASIC and the Raspberry Pi ?
In your home folder is a hidden folder named ~/.config
(the point in front of a file or folder makes it hidden)
In this folder many apps save the settings.
In case of geany it's:
"~/.config/geany/geany.conf"
!!! Close geany if it's running !!!
Open the file with an editor and edit near the section [tools]
[tools]
terminal_cmd=x-terminal-emulator --command="/bin/sh %c"
Before you delete the current line make a copy or write it down and post it here.
Joshy
(the point in front of a file or folder makes it hidden)
In this folder many apps save the settings.
In case of geany it's:
"~/.config/geany/geany.conf"
!!! Close geany if it's running !!!
Open the file with an editor and edit near the section [tools]
[tools]
terminal_cmd=x-terminal-emulator --command="/bin/sh %c"
Before you delete the current line make a copy or write it down and post it here.
Joshy
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
.
Last edited by BasicCoder2 on Mar 25, 2018 0:33, edited 1 time in total.
Re: FreeBASIC and the Raspberry Pi ?
@BasicCoder2-
Since your hello program got compiled and runs as expected, I think maybe your Geany program got disrupted somehow. What I would do is:
sudo apt-get update
sudo apt-get install geany
If it comes back with a "geany is already installed" message, then I would do:
sudo apt-get remove geany
do another:
sudo apt-get update
just to be sure, then
sudo apt-get install geany
this should give you a fresh installation of geany. Now, I would go back and try the Geany IDE again.
Since your hello program got compiled and runs as expected, I think maybe your Geany program got disrupted somehow. What I would do is:
sudo apt-get update
sudo apt-get install geany
If it comes back with a "geany is already installed" message, then I would do:
sudo apt-get remove geany
do another:
sudo apt-get update
just to be sure, then
sudo apt-get install geany
this should give you a fresh installation of geany. Now, I would go back and try the Geany IDE again.
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
@dasyar,
That didn't make any difference however I think I have found the relevant config file.
That didn't make any difference however I think I have found the relevant config file.
Last edited by BasicCoder2 on Mar 25, 2018 0:34, edited 1 time in total.
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
terminal_cmd=x-terminal-emulator -e "/bin/sh %c"D.J.Peters wrote:In your home folder is a hidden folder named ~/.config
(the point in front of a file or folder makes it hidden)
In this folder many apps save the settings.
In case of geany it's:
"~/.config/geany/geany.conf"
!!! Close geany if it's running !!!
Open the file with an editor and edit near the section [tools]
[tools]
terminal_cmd=x-terminal-emulator --command="/bin/sh %c"
Before you delete the current line make a copy or write it down and post it here.
Joshy
Execute works!
When I use the screenres command what should type in the geany.conf file to prevent the terminal window also appearing?
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: FreeBASIC and the Raspberry Pi ?
So far I know geany needs the console to execute the fresh build.
Your compiled binary can be executed via mouse from file manager without a console window.
I use the console for debug outputs.
So the console is more a feature while develop a program.
But may be I'm wrong.
Joshy
Your compiled binary can be executed via mouse from file manager without a console window.
I use the console for debug outputs.
So the console is more a feature while develop a program.
But may be I'm wrong.
Joshy
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
Yes you are right. It works fine that way. The console window is not an issue when developing a program.D.J.Peters wrote:Your compiled binary can be executed via mouse from file manager without a console window.
It has been a long drawn out process but may I thank everyone who has helped me get FreeBASIC working on the Raspberry Pi.
I have found examples of ARM assembler code to control the PINS so my next task will be learning enough to use it in a FreeBASIC program.
Re: FreeBASIC and the Raspberry Pi ?
When I use the screenres command what should type in the geany.conf file to prevent the terminal window also appearing?
I do the quick and dirty, add -s gui to the compile command.
I do the quick and dirty, add -s gui to the compile command.