I’ve written and used Ada a lot for terminal programs on Windows and never run into this. What code page do you have selected (I.e what does the chcp command report?)?
Which Windows version are you running? Are you running powershell from inside GNAT studio or separately? Does running from a command prompt (cmd) window give this as well? I would also try the Windows Terminal app if you have it.
I have tried cmd. No output. I am running Windows 11 including the last updates. With earlier versions the problem was the same. I am running powershell separately. chcp active code page 850
The windows terminal app starts powershell, I am using that as administrator.
project Hello_World_DOS is
for Main use (“Hello_World_DOS.adb”);
for Source_Dirs use (“./src”);
package Linker is
for Default_Switches (“Ada”) use (“-mwindows”);
end Linker;
end Hello_World_DOS;
Well, that means that your application is activated without a console, i.e. it is considered a GUI application. That happens even if you start the app from a cmd/PowerShell console.
Under MSYS2 in an emulated tty this is handled differently, so under MSYS it appears to work.
So, in general, for applications that write to standard output do not use ‘‘-mwindows”’ in your .gpr file
RobG9876 Got out the complete Linker. It worked. Thanks
DelusionalMuppet. If you do not specify the position of the object file, Gnat Studio chooses a standard position, So if you don’t care Just let the compiler choose.