我试着在Fedora 35上用GPSCommunity2021的GnatColl构建一些东西。链接器坏了,说
ld: /path/to/common/Ada/Quoter/obj/gnatcoll-refcount.o: in function `gnatcoll__refcount__sync_bool_compare_and_swap':
gnatcoll-refcount.adb:(.text+0x622): undefined reference to `gnatcoll_sync_bool_compare_and_swap_access'
collect2: error: ld returned 1 exit status如果我尝试使用gprbuild -P Quoter.gpr运行项目,这也会失败。
通过复制失败的命令(gcc ...)并将~/opt/GNAT/2021/include/gnatcoll/gnatcoll_support.c添加到要编译的文件列表中,我可以从命令行修复这个问题,因为这是包含了所需函数的文件。不过,这太不方便了。
我想我的配置有点不对。这里有谁有主意吗?
发布于 2022-04-30 04:28:38
我找到了答案,这有点尴尬,但看看小虫虫的例子就可以了:将with "gnatcoll";添加到gpr文件的开头。
https://stackoverflow.com/questions/72065103
复制相似问题