Thanks everyone for explaining this,  and thanks for the various solutions.  I 
don't like modifying units that are part of a package because then I would need 
to remember how I modified them when a new version is released or have to 
figure out what's going on all over again.  

> 3) Make sure you always rebuild the unit depending on the program you want to 
> compile (Compile -> Build).

Is there a way to force this with the command line? (same as Compile > build 
from the IDE) ?

>Defines have impact only when compiling the particular source code. Having a 
>'global define' in a program could never have impact to a unit which might be 
>already compiled using different defines at the moment the particular program 
>is compiled. 

Oh, I see the issue here.   So If I were to write a unit that I wanted Programs 
to share, but have various options, I may be better off to define a variable in 
the unit and let the programs change the variable depending on what they 
want.... with the compiler directives, it's actually leaving out parts 
altogether, so you need to re-compile the unit if you want to change it... 
makes smaller files than always including things you don't want to use. 

>Yes, projects are 'a Lazarus thing'. However, you can achieve a similar effect 
>with local options and configuration files for the text-mode IDE (you just 
>need to use different directories for different 'projects').
Using directories sounds easy enough.  

>Alternatively you can pass @your.cfg to add a config.
That's good to know, and could be useful!   Since fp gets constantly re-saved 
when the IDE closes, it's possible that custom settings could be forgotten 
about and overwritten to not be there anymore.  Using a custom cfg with this 
method would allow the changes to be kept separate and be a more obvious 
reminder that they need to happen.  Can I add the custom config into the IDE 
someplace? 

James

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to