免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2137 | 回复: 2
打印 上一主题 下一主题

linux下生成静态库的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-12-28 08:38 |只看该作者 |倒序浏览
在makefile中使用cc -xar 。。。。。。生成静态库,
编译的时候说没有 ar 这个标记!

该怎么办?有替代的标记吗?

论坛徽章:
0
2 [报告]
发表于 2005-12-28 08:42 |只看该作者
ar是个单独的命令,先用cc -c 把源程序编译成.o文件,然后再用ar *.o 到一个静态库文件中。

论坛徽章:
0
3 [报告]
发表于 2005-12-28 10:13 |只看该作者
-x language
              Specify  explicitly the language for the following input files (rather than choosing a default based on the file name suffix) .
              This option applies to all following input files until the next `-x' option.  Possible values  of  language  are  `c',  `objec­
              tive-c', `c-header', `c++', `cpp-output', `assembler', and `assembler-with-cpp'.

-x none
              Turn  off  any specification of a language, so that subsequent files are handled according to their file name suffixes (as they
              are if `-x' has not been used at all).


这是gcc manpage中关于-x参数的说明,木有找到你说的参数

谁告诉你这么用的?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP