console apps, lazarus and windows me lazarus / 13-General ---------------------------------------------------------------------- kruwi · 2006-08-07 09:28 I use lazarus (0.9.16) on my windows me system. Producing gui apps is working fine. Producing console apps however is only working from the command line using fpc. If I try to run a console app from the lazarus ide (new project: free pascal program) there is no screen output to be seen-!!! Example: Program test; ... begin writeln('hello'); readln; end. I can compile the project, but when I run it, there's only an empty console window to be seen. Nothing like ('hello'). With windows xp, which I'm using on my other system, everything runs flawlessly!!! If I type writeln('hello'), there is a 'hello' output in the console window to be seen. It doesn't matter if I run the project from lazarus or by using fpc from the command line. Under windows me, this does only work from the command line, not from the lazarus ide. There's no error message . Th console window just stays empty. How can I solve this problem????  :roll:  :roll: ---------------------------------------------------------------------- qodah · 2006-08-08 01:18 Did you try to use original FPC to Compile ?? what version u used? My be your Windows ME not support for 32 bit Console. or try this Function for Write n Read text: Code: [Select]const   MaksBuf = 1024 * 4; type   TPString = ^ShortString; var   IdxTulis, IdxBaca: Integer;   BufBaca, BufTulis: array[0..MaksBuf] of Char; procedure ReadStr(var Value: ShortString); var   I, J: Integer; begin   I := IdxBaca;   while I <= MaksBuf do begin     if BufBaca[I] = #0 then begin       Dec(I, IdxBaca);       if (I > 0) then         Move(BufBaca[IdxBaca], BufBaca[0], I);       J := fdRead(0, BufBaca[I], MaksBuf-I-1);       if J=0 then begin         Value := '';         Break;       end;       BufBaca[I+J] := #0;       IdxBaca := 0;     end     else if BufBaca[I] = #10 then begin       Move(BufBaca[IdxBaca], Value[1], I-IdxBaca);       Value[0] := Chr(I-IdxBaca);       Inc(I);       Break;     end     else Inc(I);   end;   IdxBaca := I; end; procedure WriteStr(Value: ShortString); begin   if (Value='') or (IdxTulis + Length(Value) >= MaksBuf-1) then begin     BufTulis[IdxTulis] := #10;     fdWrite(1, BufTulis[1], IdxTulis);     IdxTulis := 0;   end;   TPString(@BufTulis[IdxTulis])^ := Value;   BufTulis[IdxTulis] := #10;   Inc(IdxTulis, Length(Value) + 1); end; function ReadInt: Integer; var   S: String[20];   I: Integer; begin   ReadStr(S);   Val(S, Result, I);   if I <> 0 then Result := 0; end; procedure WriteInt(Value: Integer); var   J: Integer; begin   if IdxTulis > MaksBuf-20 then begin     BufTulis[IdxTulis] := #10;     fdWrite(1, BufTulis[1], IdxTulis);     IdxTulis := 0;   end;   Str(Value, TPString(@BufTulis[IdxTulis])^);   J := Ord(BufTulis[IdxTulis]) + 1;   BufTulis[IdxTulis] := #10;   Inc(IdxTulis, J); end; source : http://delphindo.wordpress.com ---------------------------------------------------------------------- Vincent Snijders · 2006-08-08 06:24 I think using the gdb debugger causes this problem. Did you try setting the debugger to none, in the debugger options in Lazarus? ---------------------------------------------------------------------- ionelroman · 2006-09-18 07:18 do you use Crt unit?