Recent

Author Topic: mtpcpu.pas(81,25) Error: Incompatible type for arg no. 1: Got "PChar", expected  (Read 350 times)

apeoperaio

  • Full Member
  • ***
  • Posts: 198
I got the error message when compiling mtpcpu.pas on MacOSX on line 81:
  fpsysctl(PSysCtl(@mib), 2, @t, @len, Nil, 0);

It is related to line 71-72:
type
  PSysCtl = {$IF FPC_FULLVERSION>30300}pcint{$ELSE}pchar{$ENDIF};

Maybe related to: https://forum.lazarus.freepascal.org/index.php/topic,47720.msg342306.html#msg342306

Any hint?
Should I report as a bug?

Lazarus 2.0.11 r64113M FPC 3.2.0 x86_64-darwin-cocoa


Jonas Maebe

  • Hero Member
  • *****
  • Posts: 818
Yes, please report a bug against Lazarus. The check should be for FPC 3.2.0 and higher instead of FPC 3.3.0 and higher.

Bart

  • Hero Member
  • *****
  • Posts: 4097
    • Bart en Mariska's Webstek
This seems to be fixed in Lazarus trunk in r63462 .
It is on the merges list.

Quote
Submitted by developer / committer and waiting for testing (do not commit yet)
...
    r63462 multithreadproc: fix compilation for fpc320 bsd targets. Issue #37255

Bart

apeoperaio

  • Full Member
  • ***
  • Posts: 198
This seems to be fixed in Lazarus trunk in r63462 .
Bart

Ok, I'll wait.
Thank you.

 

TinyPortal © 2005-2018