(Solved) Static linking in FPC 3.3.1 problem lazarus / 64-FPC development ---------------------------------------------------------------------- Igor · 2020-07-28 07:54 I get this error: QuoteStaticLinkingUtils.pas(63,65) Fatal: Syntax error, "BEGIN" expected but "[" found On this line: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function _log(x: double): double; cdecl; export; {$ifdef Win64} [alias: 'log']; {$endif}begin  result := 0; // ln(x);end; I use this code to link statically some .o files from GCC compiler. I attach full code in a file. Lazarus 2.1.0 r63658 FPC 3.3.1 x86_64-win64-win32/win64 P.S. No problem with FPC 3.2.0 ---------------------------------------------------------------------- Cyrax · 2020-07-28 07:59 Change [alias: 'log']; to external name 'log'. ---------------------------------------------------------------------- Igor · 2020-07-28 11:19 Thanks, can you show full line of a code? I get a new error: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function _log(x: double): double; cdecl; export; external name 'log'; QuoteStaticLinkingUtils.pas(64,50) Error: Procedure directive "EXTERNAL" cannot be used with "EXPORT" ---------------------------------------------------------------------- Cyrax · 2020-07-28 11:35 Remove export; directive. ---------------------------------------------------------------------- Cyrax · 2020-07-28 11:47 Sorry, I just took a look at your unit file. Either change [alias: 'log'] to [public, alias: 'log'] or use public name 'log'. https://www.freepascal.org/docs-html/ref/refsu71.html ---------------------------------------------------------------------- Igor · 2020-07-30 08:51 Thanks! Your solution helped me to compile my app in FPC Trunk!