在我正在研究的这个多语言GPRBuild项目中,我有一些c ++库文件(*.a)我需要链接到我的可执行文件.是否有一个gpr属性告诉它将-l -L开关传递给链接器的链接是什么?
在主项目文件中,
package Linker is
for Default_Switches ("Ada") use ("-L/where/ever", "-lbar");
end Linker;
Run Code Online (Sandbox Code Playgroud)
小智 7
甚至更好:
Project my_library is
For externally_built use "true";
For library_dir use "/where/ever";
For library_name use "mylibname";
For source_dirs use (); -- no sources.
For library_kind use "static";
-- if it is a static lib .a
-- for library_kind use "dynamic";
-- if it is an so.
End my_library;
Run Code Online (Sandbox Code Playgroud)
并在应用程序项目中.用"my_library.gpr";
| 归档时间: |
|
| 查看次数: |
4725 次 |
| 最近记录: |