I am running 4.51 x64 on Mint 10
The OpenConsole() doesn't open anything. Am I missing something?
OpenConsole() issue
- DarkRookie
- User
- Posts: 20
- Joined: Wed Nov 24, 2010 5:47 pm
OpenConsole() issue
It is better to have a dumb question than a wrong answer!
Re: OpenConsole() issue
Did you set the executable format to console in compiler options.
Windows 11, Manjaro, Raspberry Pi OS


- DarkRookie
- User
- Posts: 20
- Joined: Wed Nov 24, 2010 5:47 pm
Re: OpenConsole() issue
Nope. Didn't know that option was there. Used to Windows
Thanks for the fix.
Thanks for the fix.
It is better to have a dumb question than a wrong answer!
-
- User
- Posts: 44
- Joined: Fri Nov 30, 2012 2:07 pm
Re: OpenConsole() issue
Setting Executable format to console has made no difference: nothing shows up. No dialogue, no nothing.
Why is this so difficult? I'm trying to execute this code from the Willloughby book:
...and bugger-all happens. Am I the only one who is actually using Linux in Purebasic?
Why is this so difficult? I'm trying to execute this code from the Willloughby book:
Code: Select all
If OpenConsole()
PrintN("1. Official PureBasic Home")
PrintN("2. Official PureBasic Forums")
PrintN("3. PureArea.net")
PrintN("")
PrintN("Enter a number from 1 To 3 and press Return: ")
Destination.s = Input()
Select Destination
Case "1"
RunProgram("http://www.purebasic.com")
Case "2"
RunProgram("http://forums.purebasic.com")
Case "3"
RunProgram("http://www.purearea.net")
EndSelect
EndIf
End
Re: OpenConsole() issue
OpenConsole() opens the channel for console output. If you run the compiled program inside a terminal you will see the console output.
Unlike on Windows, the 'console window' on linux is really an external program (a terminal emulator) in which you must run your program in order to see the output. You cannot start it from inside your program.
Btw, please don't repost the same question in many different topics. You won't get better answers that way. One topic is enough.
Unlike on Windows, the 'console window' on linux is really an external program (a terminal emulator) in which you must run your program in order to see the output. You cannot start it from inside your program.
Btw, please don't repost the same question in many different topics. You won't get better answers that way. One topic is enough.
quidquid Latine dictum sit altum videtur
-
- User
- Posts: 44
- Joined: Fri Nov 30, 2012 2:07 pm
Re: OpenConsole() issue
Thanks for that, Freak. I've been working with this for the past 6 hours without any answer on the threads nor any clue in the documentation... thank goodness Fred pointed out to me where I was going wrong.freak wrote:OpenConsole() opens the channel for console output. If you run the compiled program inside a terminal you will see the console output.
Unlike on Windows, the 'console window' on linux is really an external program (a terminal emulator) in which you must run your program in order to see the output. You cannot start it from inside your program.
Btw, please don't repost the same question in many different topics. You won't get better answers that way. One topic is enough.
So, that tutorial by Gary Willoughby is useful only to Windows users, then. He failed to mention that. I guess he thought that no need to include any other than Windows users, really... Gotcha. Thanks for the heads-up.

Re: OpenConsole() issue
In the manual it says:
But after setting compiler options to "console", the console example program "console.pb" ran just fine. The console was launched from the IDE, although it was a smaller window than my xterm settings give when launching a console in the "normal" way. I'm using Xubuntu 12.04.On Linux and OS X, this command has no effect, as there is no special 'Console' format.