Recent

Author Topic: Lazarus Release Candidate 1 of 2.2.0  (Read 70589 times)

d7_2_laz

  • Full Member
  • ***
  • Posts: 198
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #30 on: July 16, 2021, 08:44:49 pm »
Would be nice!
Many thanks to you both for attention!
OutputDebugString, as based specifically on an Windows API call, is rather known in the Windows environment.
I like it because it is a handy and easy way to put info to the message window,
without needing to apply (and remove afterwards) additional includes, or to change project options temporarely between the compiles.
Simply code a one-liner, trace your program flow and remove the line afterwards. So it would be nice to see it stay alive and not die, if possible.

440bx

  • Hero Member
  • *****
  • Posts: 2503
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #31 on: July 16, 2021, 08:55:54 pm »
Just haven't gotten around yet do add it.
That makes sense.  I was fairly sure you knew about it but, just in case, I thought I'd mention it.

I like it because it is a handy and easy way to put info to the message window,
without needing to apply (and remove afterwards) additional includes, or to change project options temporarely between the compiles.
Simply code a one-liner, trace your program flow and remove the line afterwards. So it would be nice to see it stay alive and not die, if possible.
Just in case you might be interested, for complex parts of a program I code something like this
Code: Pascal  [Select][+][-]
  1. if IsDebuggerPresent then
  2. begin
  3.   { if there is no console, create a console, otherwise use the existing console }
  4.  
  5.   { format the string message using whatever functions are appropriate }
  6.  
  7.   writeln(<the formatted string>)
  8.  
  9.   { possibly trigger an int 3 depending on what has happened or a readln }
  10.   { optionally dispose of the console }
  11.  
  12.   { resume execution }
  13. end;
FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

jamie

  • Hero Member
  • *****
  • Posts: 4920
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #32 on: July 16, 2021, 11:10:46 pm »
What's wrong with Asserts? They don't work anymore ?
The only true wisdom is knowing you know nothing

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7440
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #33 on: July 17, 2021, 12:00:26 am »
I have tried to install the lazreportpdfexport0.9 package on windows 7 32 bit and it gives me the following error:

lr_e_pdf.pas(539,19) Error: identifier idents no member "SubType"
lr_e_pdf.pas(540,26) Error: identifier idents no member "URI"
I asked around, I was told https://bugs.freepascal.org/view.php?id=37995
(outdate powerpdf version)

PascalDragon

  • Hero Member
  • *****
  • Posts: 3406
  • Compiler Developer
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #34 on: July 17, 2021, 04:08:14 pm »
What's wrong with Asserts? They don't work anymore ?

If all you want is to generate some output if a debugger is present, but keep the program itself running then an Assert would be the wrong functionality to use.

d7_2_laz

  • Full Member
  • ***
  • Posts: 198
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #35 on: July 19, 2021, 01:04:00 pm »
Only a short questoion: about the "OutputDebugString" / Windows as mentioned earlier,
will it be reanimated? Didn't get it quite fore sure.
(bzw: thanks 440bx for your additinal hint!)

CM630

  • Hero Member
  • *****
  • Posts: 964
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #36 on: July 19, 2021, 02:23:14 pm »
win32richmemoproc.pas from richmemopackage does not compile for me.
Says
win32richmemoproc.pas(335,22) Error: Incompatible types: got "<address of function(PDWord;PByte;LongInt;var LongInt):DWord;StdCall>" expected "<procedure variable type of function(LongWord;PByte;LongInt;var LongInt):DWord;StdCall>" on cbs.pfnCallback := @RTFLoadCallback;
Лазар 2,2,0RC1 32 bit; FPC3,2,2; rev 65419 on W10 64bit.

avra

  • Hero Member
  • *****
  • Posts: 2249
    • Additional info
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #37 on: July 19, 2021, 02:29:58 pm »
Only a short questoion: about the "OutputDebugString" / Windows as mentioned earlier,
will it be reanimated?
I have checked it today and it worked. When in Lazarus / Tools / Options / Debugger / EventLog / Messages you check Output checkbox, OutputDebugString('<<<<< It works ! >>>>>') outputs to Debug Output window (I have tested it with a simple button on a form and it's on click event). There are a lot of debug messages so you will have to search for it, but it is there. Your GUI or console application needs to include windows unit and you need to make Output Debug window visible. That's all you need to do on Windows.

For more serious work I do recommend something like MultiLog.
« Last Edit: July 19, 2021, 02:33:23 pm by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7440
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #38 on: July 19, 2021, 03:14:02 pm »
Only a short questoion: about the "OutputDebugString" / Windows as mentioned earlier,
will it be reanimated? Didn't get it quite fore sure.
(bzw: thanks 440bx for your additinal hint!)

I think it needs gdb currently.

As for FpDebug, not sure if I get to it in time.

d7_2_laz

  • Full Member
  • ***
  • Posts: 198
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #39 on: July 19, 2021, 03:22:35 pm »
Thank for your both info!


skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2712
    • havefunsoft.com
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #40 on: July 19, 2021, 04:26:41 pm »
win32richmemoproc.pas from richmemopackage does not compile for me.
Says
win32richmemoproc.pas(335,22) Error: Incompatible types: got "<address of function(PDWord;PByte;LongInt;var LongInt):DWord;StdCall>" expected "<procedure variable type of function(LongWord;PByte;LongInt;var LongInt):DWord;StdCall>" on cbs.pfnCallback := @RTFLoadCallback;

It appears to be FPC 3.2.2 related
And should have been fixed with this pull request
Are you pulling your richmemo from github?

d7_2_laz

  • Full Member
  • ***
  • Posts: 198
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #41 on: July 19, 2021, 06:53:15 pm »
avra, i don't see those options at the told place   .. even not with the gdb.
Could we exchange a bit some settings?  I'll open an item in the Debugger forum  (but not today).
Thanks!

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7440
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #42 on: July 19, 2021, 08:20:49 pm »
Only a short questoion: about the "OutputDebugString" / Windows as mentioned earlier,
will it be reanimated? Didn't get it quite fore sure.

Should work with fpdebug (on windows).
Tested with 64 bit, if someone can check 32bit...

Trunk or fixes branch

avra

  • Hero Member
  • *****
  • Posts: 2249
    • Additional info
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #43 on: July 20, 2021, 09:40:13 am »
avra, i don't see those options at the told place   .. even not with the gdb.
Be more specific of what you do not see. Output checkbox in "Lazarus / Tools / Options / Debugger / EventLog / Messages" configuration dialogue, Debug Output window, or something else?
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

CM630

  • Hero Member
  • *****
  • Posts: 964
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #44 on: July 20, 2021, 09:57:09 am »
win32richmemoproc.pas from richmemopackage does not compile for me.
...

It appears to be FPC 3.2.2 related
And should have been fixed with this pull request
Are you pulling your richmemo from github?
I have downloaded it from sourceforge.
Now I cloned it from github and it works.
Thanks!
Лазар 2,2,0RC1 32 bit; FPC3,2,2; rev 65419 on W10 64bit.

 

TinyPortal © 2005-2018