can defines be made global ? lazarus / 62-General ---------------------------------------------------------------------- 440bx · 2018-08-30 10:44 Hello, when defining a symbol, e.g, {$define somesymbol} the definition remains valid in the unit. Is it possible to have a {$define somesymbol} that defines "somesymbol"  in all the units used by the program without having to re-{$define somesymbol} in every unit ? Thank you. ---------------------------------------------------------------------- taazz · 2018-08-30 10:45 only if you use a defines.inc file and included in your units. ---------------------------------------------------------------------- Bart · 2018-08-30 10:50 Compile with -dSomesymbol Bart ---------------------------------------------------------------------- 440bx · 2018-08-30 10:57 Quote from: Bart on August 30, 2018, 12:50:46 pmCompile with -dSomesymbol Bart Thank you Taazz and thank you Bart.  Bart, I will take your answer. (geez..  I should have thought about that...) ---------------------------------------------------------------------- marcov · 2018-08-30 11:24 Quote from: Bart on August 30, 2018, 12:50:46 pmCompile with -dSomesymbol Do a build-all with -dsomesymbol. ---------------------------------------------------------------------- 440bx · 2018-08-30 12:15 Quote from: marcov on August 30, 2018, 01:24:10 pmQuote from: Bart on August 30, 2018, 12:50:46 pmCompile with -dSomesymbol Do a build-all with -dsomesymbol. Indeed, build, to ensure the defined symbol applies to the entire program.  Thank you Marco. ---------------------------------------------------------------------- JuhaManninen · 2018-08-30 12:19 Quote from: marcov on August 30, 2018, 01:24:10 pmDo a build-all with -dsomesymbol. The Project Options -> Compiler Options -> Custom Options pane in Lazarus has a nice GUI for defines. It remembers the earlier used ones. A build-all is done automatically after compiler options change. ---------------------------------------------------------------------- 440bx · 2018-08-30 12:28 Quote from: JuhaManninen on August 30, 2018, 02:19:51 pmQuote from: marcov on August 30, 2018, 01:24:10 pmDo a build-all with -dsomesymbol. The Project Options -> Compiler Options -> Custom Options pane in Lazarus has a nice GUI for defines. It remembers the earlier used ones. A build-all is done automatically after compiler options change. Yes, it does and, I used that to put my defines in there.