News:

Welcome to RetroCoders Community

Main Menu

Graphics Window

Started by johnno56, Sep 15, 2022, 10:31 AM

Previous topic - Next topic

johnno56

With thanks to Ron77, freebasic, now runs without error... until I tried a freebasic tutorials/Game Programming/How to program a game...

   
Screen 13,8,2,0 ' Sets the graphic mode
    Do
    ' We'll put our statements here later
    Loop Until Inkey$ = "Q" Or Inkey$ = "q"

Found that I had to install libxpm-dev to be able to view any graphics. Lib installed. Error gone.

The program 'compiled and ran' successfully, via PoseidonFB, but did not produce any visual display. Proceeded to the directory that contained the "screen 13" example executable. Executed from the Terminal and the program displayed the desired result.

Linux Mint 20.3 uses gnome-terminal. Is there a way to 'tell' the 'compile and run' to output to the terminal?
May your journey be free of incident.  Live long and prosper.

ron77

#1
hello johnno56 :) good day (or night over there)

freebasic has a few options -

1. to print or use the gnome terminal alone you do not need to use the screen command

2. 'Screen' command means you wish to use one of the fixed screens freebasic has to offer most of them are text screens with different sizes 'screen 13' is the graphic screen (legacy) compatible with QBasic

3. command 'screenres" and "#include "fbgfx.bi" at the top of the code calls for a costume graphic (not a text screen) with freebasic fbgfx library...

please check if you are not missing any libraries dependencies on your Linux machine

as for the code itself - well since you did not put a statement for displaying something :/ try this code and let us know the result

screen 13
Do

Loop Until inkey() = "Q" Or inkey() = "q"

the syntax you are using seems taken from the '#lang "QB"' dialect so perhaps you should try this option as well

#lang "qb"

Screen 13,8,2,0

Do

Loop Until Inkey$ = "Q" Or Inkey$ = "q"

let us know is those solutions work... :)

johnno56

I am not sure if I explained the problem correctly.

Using only PoseidonFB, I can click the 'compile' button, the process completes successfully.
If I then click the 'Run" button I get the following screen. (or I can click 'Compile and Run' button)

You cannot view this attachment.

The message says that the screen13 executable is running... The above image is the 'only' image on the screen. If I want to view the visible result of the program I have to execute the compiled program using  Terminal.

PoseidonFB, for me anyway, is not producing a resulting screen.

Also... "please check if you are not missing any libraries dependencies on your Linux machine"

I am not receiving any error messages. How exactly am I supposed to know which libraries or dependencies are missing?

Is it me or is it normal to experience this much difficulty setting up PoseidonFB?

J
May your journey be free of incident.  Live long and prosper.

ron77

hello johnno56

:/ mmm... Poseidon FB IDE is a half-backed project, and you may have found a bug in it OR...
Mmm...

regarding missing libraries, please check this post: https://retrocoders.phatcode.net/index.php?topic=216.0

However, I think it might not be a missing library but a bug in the IDE settings... usually on freebasic you click "Compile and Run" rather than "Compile" and then "Run"

are you getting the same faulty result when you use Geany IDE?

I may need to call mysoft who might know what I'm missing... I'll tell him it's urgent

ron77

#4
okay, johnno56 I consulted mysoft...

Poseidon FB is a bit buggy, especially for Linux I remember me and mysoft had you do some sort of workaround for it to compile AND RUN on my ubuntu Linux when I was using Linux.

The last resort is, please try changing the BUILD COMMANDS to the following when you "compile and run"

-s console -gen gcc -Wc -Ofast -Wc -Wno-maybe-uninitialized -exx -w all

that's right "-s console" and not "-s gui"

and tell us the result???

in case it doesn't work you can do two things...

1. register in freeBASIC main forum and ask for help, and hope someone can help you (who is using Linux and Poseidon FB IDE)

2. use Geany IDE for freeBASIC.

johnno56

I had forgotten to mention that I had the same result using console and gui...

I will test with Geany... I will try tonight or first thing tomorrow...

J
May your journey be free of incident.  Live long and prosper.

johnno56

Fresh install of Geany 1.38

Configured for freebasic. Compiled and ran just fine. See attached.

You cannot view this attachment.


"Riddle me that one, Batman."
May your journey be free of incident.  Live long and prosper.

ron77


johnno56

My remaining issue is not FB related directly. RCBasic and FreeBasic both use the file extension '.bas'... I may have to create a separate Geany config file for both... Ah... The joys of coding...

Many thanks for the assist, Ron. Much appreciated...  I may have more questions... Moo Ha Ha...
May your journey be free of incident.  Live long and prosper.

electricwalrus

Good start. I never had any of these problems with WinFBE installation. But it seems you got it running in the end. Great! :)

johnno56

I also tried running the Windows versions of fbide and Fbedit and winFBE via Wine, on my Linux machine, and all failed. Wine can run a lot of Windows stuff but not all windows stuff and not always 100% accurate... It was worth a shot... lol
May your journey be free of incident.  Live long and prosper.