Hello World works in Linux terminal but not in Emacs shell

Linux specific questions.
Post Reply
FBC_User
Posts: 4
Joined: Dec 31, 2016 8:33

Hello World works in Linux terminal but not in Emacs shell

Post by FBC_User »

I am on Ubuntu Linux 22.04 and just did a hello_world.bas (Print "Hello World!") and it compiles and I can run it in the terminal. But if I do an Emacs shell and try and run it there is nothing printed and it hangs, forcing me to hit Ctrl-C ?? I am able to run a C hello-world program and see the output in the Emacs shell.
Imortis
Moderator
Posts: 1947
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: Hello World works in Linux terminal but not in Emacs shell

Post by Imortis »

Searching the forums, the only thing I could find regarding Emacs was this: https://www.freebasic.net/forum/viewtopic.php?p=290979

I don't know it that helps or not.
RUbarzan
Posts: 1
Joined: Sep 07, 2024 15:11

Re: Hello World works in Linux terminal but not in Emacs shell

Post by RUbarzan »

I think you are doing it with "M-x Compile" (i.e Pressing Alt+X and then writing Compile).

An easier way to do it, while avoiding complications of Emacs, is to open a "Elisp shell" or "Bash shell" by writing "M-x eshell" or "M-x shell"
and then compile your file in the usual way you do in Terminal:

Code: Select all

$ fbc MyProgram.bas
$ ./MyProgram
> Hello world
Post Reply