【问题标题】:Does ar not support 64 bit on solaris x86?ar 在 solaris x86 上不支持 64 位吗?
【发布时间】:2016-05-12 05:34:40
【问题描述】:

我的构建在 solaris x86 上因 64 位加速而失败。原因是 ar 命令无法将 *.o 打包到 64 位静态库。谁能帮助它?感谢您的 cmets 以下是我的测试:

% ar rc test.a date_generators.o greg_month.o greg_weekday.o 

% file *
date_generators.o:      ELF 64-bit LSB relocatable AMD64 Version 1
greg_month.o:   ELF 64-bit LSB relocatable AMD64 Version 1
greg_weekday.o: ELF 64-bit LSB relocatable AMD64 Version 1
test.a:         current ar archive, 32-bit symbol table
% ar
usage: ar -d[-SvV] archive file ...
ar -m[-abiSvV] [posname] archive file ...
ar -p[-vV][-sS] archive [file ...]
ar -q[-cuvSV] [-abi] [posname] [file ...]
ar -r[-cuvSV] [-abi] [posname] [file ...]
ar -t[-vV][-sS] archive [file ...]
ar -x[-vV][-sSCT] archive [file ...]

【问题讨论】:

    标签: c++ solaris-10 unix-ar


    【解决方案1】:

    您的 test.a 文件确实包含 64 个库,它只是它的 32 位符号表,但这并不妨碍 64 位链接工作。

    如果你真的想让file 声明它有一个 64 位符号表,你可以运行:

    ar Src test.a date_generators.o greg_month.o greg_weekday.o 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-01-17
      • 2021-03-01
      • 2015-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-12
      相关资源
      最近更新 更多