Page 1 of 1

Simple Console No Go!

Posted: Wed Sep 30, 2020 1:30 am
by Gary.Maine
This simple code works fine in win10, but no console is diplayed in Ubuntu 18.04?

Code: Select all


OpenConsole("Test")
ConsoleLocate(100,100)

  A$ ="xxxxxxxx"

  PrintN(A$)
Debug A$


Delay(5000)
// Moved from "Bugs - Linux" to "Coding Questions" (Kiffi)

Re: Simple Console No Go!

Posted: Wed Sep 30, 2020 6:06 am
by Marc56us
This simple code works fine in win10, but no console is diplayed in Ubuntu 18.04?

Code: Select all

ConsoleLocate(100,100)
Not a bug. (Coding Questions)
F1 - List of Platform-dependent Functions
ConsoleCursor() "On Linux or MacOS, this is ignored as the console is only line based"

:wink:

Re: Simple Console No Go!

Posted: Thu Oct 01, 2020 1:25 am
by Gary.Maine
Ok, but why is this not working on Linux? Yet it still works on Win10?

Code: Select all

OpenConsole("Test")
;ConsoleLocate(100,100)

  A$ ="xxxxxxxx"

  PrintN(A$)
Debug A$


Delay(5000)

Re: Simple Console No Go!

Posted: Thu Oct 01, 2020 1:37 am
by Paul
Under "Compiler Options" did you set "Executable Format" to "Console" ??

Re: Simple Console No Go!

Posted: Thu Oct 01, 2020 1:45 am
by Gary.Maine
Paul wrote:Under "Compiler Options" did you set "Executable Format" to "Console" ??
No I did not, in Linux or Win10. Is this OS depenent?

Re: Simple Console No Go!

Posted: Thu Oct 01, 2020 1:51 am
by Gary.Maine
Paul wrote:Under "Compiler Options" did you set "Executable Format" to "Console" ??
Yes that solved the issue. But why is it not the same in Win????? And not Documented?

Thanks for the help!!

Gary

Re: Simple Console No Go!

Posted: Thu Oct 01, 2020 2:32 am
by Paul
MacOS must also be set to Console if you want to compile a console app.

For "Console" the PureBasic help file says...
"If your program is intended to be a pure console application (i.e. not a GUI application which sometimes opens a console) then you must remember to set the executable format to 'Console' when you are compiling your programs."

Re: Simple Console No Go!

Posted: Thu Oct 01, 2020 2:40 am
by Gary.Maine
Thank You!