How can I add a library path to a delphi project?

陌路散爱 提交于 2020-01-02 16:18:25

问题


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 with foo.32.a and foo.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?


回答1:


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.



来源:https://stackoverflow.com/questions/32338379/how-can-i-add-a-library-path-to-a-delphi-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!