Console

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

Console

Postby albert » Dec 03, 2017 18:03

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: 2113
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Console

Postby MrSwiss » Dec 03, 2017 23:09

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: 1064
Joined: Feb 26, 2007 5:32

Re: Console

Postby caseih » Dec 04, 2017 5:11

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: 373
Joined: Oct 19, 2017 15:00
Location: 't Zand, NL
Contact:

Re: Console

Postby Munair » Dec 04, 2017 8:32

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: 4039
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Console

Postby albert » Dec 04, 2017 22:44

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..

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 1 guest