Console

Linux specific questions.
Post Reply
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Console

Post by albert »

Hello;

How do you get programs under WINE to open a console...
Currently i have to set screen to something other than screen 0 to get output.

If i set it to screen 0 , i get nothing...and have to open "top" to kill the FBIDETEMP.EXE

Under Linux Geany i get the same problem , it won't open a screen 0 console, i have to set screen to something other than 0


Is there some libs that don't come with FB that i'm missing, I installed the Lncurses lib.
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Console

Post by MrSwiss »

albert wrote:How do you get programs under WINE to open a console...
You'll have to compile the source with FBC-WIN 32/64 (since, WINE is a Windows-Emulator).
FBC -s console ...
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Console

Post by caseih »

Under wine, console output from a windows program just goes to the same terminal where you launched Wine from. If you ran it from the GUI, then there won't be any console output at all.

You need to launch your program with wine from a terminal. However WINE itself prints a lot of debugging output to the terminal, so you may not even see your FB program's output for all the noise. There are two ways to address this. First you can run your program with this terminal command:

Code: Select all

WINEDEBUG=-all wine /path/to/myfb.exe
That will suppress all wine debugging information.

The other method is to have wine launch a Console window, and run your executable from there. To do this do:

Code: Select all

wine cmd
That will pop up a window that looks a lot like a Windows console window.

As to wine doesn't pop up a console window automatically like what happens in Windows, I suppose it's because Wine is designed so that it can run without any graphics system.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: Console

Post by Munair »

albert wrote:Under Linux Geany i get the same problem , it won't open a screen 0 console, i have to set screen to something other than 0
That would be a native Linux compilation. If you start your program from the terminal with ./MyProgram then you should see something. Even a simple PRINT will output to the terminal. No need to call screen 0 for that. I think that a simple CLS already defaults to screen 0 unless explicitly set otherwise.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Console

Post by albert »

I got it working...

I press F5 (quick run ) and no console ,
but after its compiled to an *.EXE it show the console window.

So i have to compile instead of quickrun..
Post Reply