How can I add a library path to a delphi project?
Put it in the project's search path (Project->Options->Delphi Compiler). You'll see a couple of examples there for using .\$(Platform)\$(Config)
, which is a relative path to the project based on the target platform and build configuration.
Comments
-
BIBD almost 2 years
I have a couple precompiled (3rd party) libraries that I need to use in my project.
I can get it to build if I put foo.a in the root of my project folder, however, I have a 32 bit version and a 64 bit version of the library and I don't want to have to swap out
foo.a
withfoo.32.a
andfoo.64.a
every time I build each version of the application.In this particular case I've put them in:
[myroot]\iOSDevice32\Debug\foo.a [myroot]\iOSDevice32\Release\foo.a
and
[myroot]\iOSDevice64\Debug\foo.a [myroot]\iOSDevice64\Release\foo.a
I could put it in the libary path (Tools -> Options -> Delphi Options -> Library -> Library Path); however, I want it to be specific to the project and relative to the root of the project folder (rather than hard coded to one location for all projects).
How can I tell Delphi/Embarcadero RAD Studio where to find these libraries?
-
BIBD over 8 yearsWhen I do that, instead I get
[DCC Error] E2597 ld: library not found for -lc++
. It seems to be overiding some existing search path instead of adding too it. -
BIBD over 8 yearsIn this case I also tried it under Search path -> Value from "All configurations -All platforms" as well.
-
BIBD over 8 yearsCorrection.... I also had it in the System library root path (which looked like a likely place to put such a creation earlier in the day). Sorry for the confusion.
-
R. Hoek about 3 yearsThis is for setting the global/IDE library path, not for the project only.