Just starting out? Need help? Post your questions and find answers here.
Gary.Maine
User
Posts: 34 Joined: Mon Oct 01, 2018 7:10 pm
Location: Winterport, Maine USA
Post
by Gary.Maine » Wed Sep 30, 2020 1:30 am
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)
Marc56us
Addict
Posts: 1600 Joined: Sat Feb 08, 2014 3:26 pm
Post
by Marc56us » Wed Sep 30, 2020 6:06 am
This simple code works fine in win10, but no console is diplayed in Ubuntu 18.04?
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 "
Gary.Maine
User
Posts: 34 Joined: Mon Oct 01, 2018 7:10 pm
Location: Winterport, Maine USA
Post
by Gary.Maine » Thu Oct 01, 2020 1:25 am
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)
Paul
PureBasic Expert
Posts: 1287 Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:
Post
by Paul » Thu Oct 01, 2020 1:37 am
Under "Compiler Options" did you set "Executable Format" to "Console" ??
Gary.Maine
User
Posts: 34 Joined: Mon Oct 01, 2018 7:10 pm
Location: Winterport, Maine USA
Post
by Gary.Maine » Thu Oct 01, 2020 1:45 am
Paul wrote: Under "Compiler Options" did you set "Executable Format" to "Console" ??
No I did not, in Linux or Win10. Is this OS depenent?
Gary.Maine
User
Posts: 34 Joined: Mon Oct 01, 2018 7:10 pm
Location: Winterport, Maine USA
Post
by Gary.Maine » Thu Oct 01, 2020 1:51 am
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
Paul
PureBasic Expert
Posts: 1287 Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:
Post
by Paul » Thu Oct 01, 2020 2:32 am
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."
Gary.Maine
User
Posts: 34 Joined: Mon Oct 01, 2018 7:10 pm
Location: Winterport, Maine USA
Post
by Gary.Maine » Thu Oct 01, 2020 2:40 am
Thank You!