Include library path in source code?
Posted on 2003-11-27
I am using Delphi 3, and I have several projects that use a particular third party compenent. Recently the component was upgraded to a new version, and some things changed with the component (new properties, functions, etc). I have since started using the new version of the component and all is swell until I open an older project that used the older version of the component. The D3 compiler refuses to compile my old projects that used the old version of the component. I did install the new component into a separate/new folder so as to not overwrite the old version of the component. I have discovered that if I change the path where the component is installed to using "Environment > Libraries > Directories > Library path" to the old component path, then the old projects will compile just fine. This is a simple enough fix, but I'll probably forget a few months from now that this is what it takes to compile the old projects.
My question is... is there a way that my project's source code can work around this? IOW, is there a way to add to the "Environment > Libraries > Directories > Library path" via my project's PAS file? Is there some directive that I can add to my source code that will eliminate the need for me to tweak the Library Path?