AIX上安装gcc并使用

3 篇文章 0 订阅

包的下载地址及安装命令:http://download.aixtools.net/gcc/

aixtools.bash.4.3.33.0.aix537.I
aixtools.gmp.5.0.5.0.I
aixtools.mpfr.2.4.2.0.I
aixtools.mpc.1.0.2.0.I
aixtools.gettext.0.18.1.1.I
aixtools.gcc.4.7.4.0.aix537.I

installp -d . -aXc all

期间遇到问题: ld:open(): A file or directory in the path name does not exist

编译生成的动态库在链接生成可执行文件时一直报错

gcc -w sm3test.c  sm4gcmtest.c  sm4ecbtest.c  sm4cbctest.c  sm4ctrtest.c  sm4ccmtest.c  fpetest.c  aesgcmtest.c  aesecbtest.c  aescbctest.c  aesctrtest.c  othertest.c  testmain.c -o testsdk -L./ -lCipherSuite_Sdk
ld: 0706-006 Cannot find or open library file: -l CipherSuite_Sdk
        ld:open(): A file or directory in the path name does not exist.
collect2: error: ld returned 255 exit status
make: 1254-004 The error code from the last command is 1.

通过查找资料发现变更为如下方式可以通过

gcc -w sm3test.c  sm4gcmtest.c  sm4ecbtest.c  sm4cbctest.c  sm4ctrtest.c  sm4ccmtest.c  fpetest.c  aesgcmtest.c  aesecbtest.c  aescbctest.c  aesctrtest.c  othertest.c  testmain.c -o testsdk -L./ libCipherSuite_Sdk.so
ld: 0711-224 WARNING: Duplicate symbol: .print_bytes
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
Target "all" is up to date.

指定编译64位的需要加上参数-maix64

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值