我正在尝试使用GNAT 95在运行带有GNAT-GPL 2015 bundle的CENTOS 7 64位的计算机上编译程序。我得到一个如下所示的编译器消息:
gprbuild: encapsulated library projects not supported on this platform
我的GPR文件如下所示:
with "bc.gpr"; -- Pull in the booch95 components since ada95 doesnt have collections
with "mylibrary.gpr"; -- one of my library projects
library project Registry is
for Source_Dirs use ("src/**");
for Object_Dir use "bin";
for Library_Name use "registry";
for Library_Standalone use "encapsulated";
for Library_ALI_Dir use "lib/registry";
for Library_Dir use "plugins";
for Library_Kind use "dynamic";
for Library_Interfaces use ("...");
package Compiler is
for Default_Switches ("Ada") use ("-g", "-gnat95");
end Compiler;
package Linker is
for Linker_Options use ("-ldl", "-lgcov");
end Linker;
end project;
Booch Components库是一个静态库项目。删除封装导致Ada抛出另一个关于尝试混合静态库和动态库的错误:
shared library project "registry" cannot import static library project "bc"
任何想法可能导致Ada编译器崩溃的原因?
答案 0 :(得分:2)
除非您使用非常旧版本的BC,否则可以通过将方案变量LIBRARY_TYPE
设置为relocatable
来构建为共享或动态库;通过设置为环境变量,或
gprbuild -XLIBRARY_TYPE=relocatable ...
或使用GPS。我不是GPS用户,但是已经调查了它(使用GPS GPL 2014)你在左侧的选项卡中选择 Scenario ,这应该显示项目和项目中的场景变量它取决于(bc
在你的情况下)。选择要更改的那个,然后单击笔图标,会出现一个对话框来更新它。