Lazarus
Free Pascal => General => Topic started by: 440bx on August 30, 2018, 12:44:24 pm
-
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.
-
only if you use a defines.inc file and included in your units.
-
Compile with -dSomesymbol
Bart
-
Compile with -dSomesymbol
Bart
Thank you Taazz and thank you Bart. Bart, I will take your answer. (geez.. I should have thought about that...)
-
Compile with -dSomesymbol
Do a build-all with -dsomesymbol.
-
Compile with -dSomesymbol
Do a build-all with -dsomesymbol.
Indeed, build, to ensure the defined symbol applies to the entire program. Thank you Marco.
-
Do 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.
-
Do 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. :)