On 29/11/13 13:32, Michael Van Canneyt wrote:


On Fri, 29 Nov 2013, Antonio Fortuny wrote:

Hi Folks.

On Linux x86_°64 Opensuse, Lazarus 1.0.12, FPC 2.6.2
Could anyone tell me why the next line
  EnterCriticalSection(CS);
with the following compiler error:
/home/sources/production/lib/usimplelogger.pas(180,27) Error: Call by var for arg no. 1 has to match exactly: Got "Pointer"
expected "QWord"  :-\
with somewhere before the declaration:
var
  CS: TRTLCriticalSection;

whilst in threadh.inc the is:
procedure EnterCriticalsection(var cs : TRTLCriticalSection);

which is pointed to when Ctrl-Left Click on the source unit word: EnterCriticalSection

With same Lazarus/FPC into Win32 Vista no compiler error and runs OK

What does TRTLCriticalSection point to ? There are multiple definitions floating around, make sure you are taking the one from the system unit:

var
   CS: system.TRTLCriticalSection;
http://bugs.freepascal.org/view.php?id=25187 makes debugging this particular issue worse.

Stephano

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to