delphi 7. How to check whether the unit file exists and add it with (directives?) to compile with the project -


i have unit part of several modules(dll, applications).

in of them need use in module classes.

is possible use compiler directives (or other methods) include unit file in case included in project?

thanks!

if understood correctly, answer yes. can use conditional define in uses clause:

uses {$ifdef use_mystuff}   myunit, {$endif}   classes, windows; 

and define (or not) conditional define use_mystuff in project options.

see $ifdef, $define , $include directives , conditional compilation.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -