Recent

Author Topic: Synchronize( ) for multithreads  (Read 849 times)

fdsingleton

  • New Member
  • *
  • Posts: 31
Synchronize( ) for multithreads
« on: May 27, 2020, 10:29:50 pm »
When I compile with the Lazarus IDE, Synchronize(@methodname) requires the "@" otherwise an error.  When I compile without the IDE it finds that the using @ is an error, i.e. only Synchonize(methodname) works.  Windows 7, latest Lazarus with FP 3.0.4.  32 bit.   

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: Synchronize( ) for multithreads
« Reply #1 on: May 27, 2020, 10:48:33 pm »
You can set modes on the commandline using -S<x> parameters, or in source with $Mode.

If you rely on the commandline, or the IDE to do so in the commandline, you need to pass appropriate parameters in other cases too.

Or use {$mode delphi} or {$mode objfpc} systematically.

 

TinyPortal © 2005-2018