Peculiar LCL $IFDEF issue...? lazarus / 31-LCL ---------------------------------------------------------------------- Sieben · 2020-12-28 20:45 I made a somewhat puzzling observation last night as already described here. When I place 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       {$IFDEF LCLGTK2}      dudeldum      {$ENDIF} somewhere in an 'original' LCL unit like eg StdCtrls.pp or customcombobox.inc the 'code' between is not grayed out but obviously is nevertheless ignored by the compiler. I am on Gtk2 here and target is Gtk2 as well. When I replace LCLGTK2 with LCLQT or LCLWIN32 the code is grayed out as expected. Other defines as eg {$IFDEF UNIX} work as expected as well. When I place above quirk in project code or source of one of my own packages the compiler does stop at dudeldum as expected. Tested twice with both stable and trunk and FPC 3.2.0. How is that...? ---------------------------------------------------------------------- MarkMLl · 2020-12-28 21:07 Sounds like the modified unit isn't the one being compiled. MarkMLl ---------------------------------------------------------------------- Sieben · 2020-12-28 21:29 No, modified unit is definitely compiled, changes in code outside above clause are reflected and syntax errors are not ignored either. ---------------------------------------------------------------------- jamie · 2020-12-28 22:27 I have run into that already before.. Code tools can see it but the compiler can not. Code tools looks at things in your project that aren't seen in the compiler.. you need to either use a define the compiler understands or include that define in the Custom-Options as a define the compiler can see. after that, the fpc should parse that correctly. In my case, I simply switched to using a Windows Check instead of a interface check.