LIB-PB v6.20+: IDE-Tool Build Library for all OS

Share your advanced PureBasic knowledge/code with the community.
User avatar
Piero
Addict
Addict
Posts: 1102
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: LIB-PB v6.20+: IDE-Tool Build Library for all OS

Post by Piero »

infratec wrote: Wed Nov 05, 2025 8:24 amReadProgramString() waits for CR.
Not true, at least on Mac…

Code: Select all

; Mac
id = RunProgram("echo", ~"-n a\rb\nc", "",  #PB_Program_Open | #PB_Program_Read | #PB_Program_Error)
If id
   While ProgramRunning(id)
      If AvailableProgramOutput(id)
         result.s = ReadProgramString(id)
      EndIf
   Wend
   CloseProgram(id)
EndIf
Debug "'"+result+"'"
Result:

Code: Select all

'a
b c'
Axolotl
Addict
Addict
Posts: 890
Joined: Wed Dec 31, 2008 3:36 pm

Re: LIB-PB v6.20+: IDE-Tool Build Library for all OS

Post by Axolotl »

The incomplete output of the compiler on windows could perhaps have something to do with this, .....
PBCompiler in Console vs. RunProgram
At least that's how it looks to me that the "--quiet " flag is included somehow.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Post Reply