免费注册 查看新帖 |

Chinaunix

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

esql编译报错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-12-21 10:07 |只看该作者 |倒序浏览
报错如下:
$ esql test.ec -o test.exe
esql[642]: cc:  not found

已安装GCC,版本如下:
$ gcc -v
Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,java --prefix=/opt/freeware --enable-threads --enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.3.0.0 --target=powerpc-ibm-aix5.3.0.0 --build=powerpc-ibm-aix5.3.0.0 --disable-libjava-multilib
Thread model: aix
gcc version 4.2.0

请问什么原因?谢谢。

论坛徽章:
11
金牛座
日期:2015-03-19 16:56:22数据库技术版块每日发帖之星
日期:2016-08-02 06:20:00数据库技术版块每日发帖之星
日期:2016-04-24 06:20:00数据库技术版块每日发帖之星
日期:2016-04-13 06:20:00IT运维版块每日发帖之星
日期:2016-04-13 06:20:00数据库技术版块每日发帖之星
日期:2016-02-03 06:20:00数据库技术版块每日发帖之星
日期:2015-08-06 06:20:00季节之章:春
日期:2015-03-27 15:54:57羊年新春福章
日期:2015-03-27 15:54:37戌狗
日期:2015-03-19 16:56:41数据库技术版块每日发帖之星
日期:2016-08-18 06:20:00
2 [报告]
发表于 2012-12-21 12:00 |只看该作者
Target: powerpc-ibm-aix5.3.0.0

在aix中,esqlc 默认使用cc

因此,你需要在环境中指定INFOMIXC=gcc 并生效
或者修改$INFORMIXDIR/bin/esql 文件
CC="${INFORMIXC=gcc}"
CC_TH="${INFORMIXC=gcc}"

论坛徽章:
0
3 [报告]
发表于 2012-12-21 12:55 |只看该作者
还是报错。

$ esql test.ec -o test.ext
gcc: unrecognized option '-brtl'
ld: 0706-006 Cannot find or open library file: -l netstub
        ldpen(): No such file or directory
collect2: ld returned 255 exit status

论坛徽章:
0
4 [报告]
发表于 2012-12-21 13:26 |只看该作者
已解决。需要加上:
-L /home/informix/lib

谢谢。

论坛徽章:
0
5 [报告]
发表于 2012-12-21 14:07 |只看该作者
这样可以成功:
$ gcc test.c -L /home/informix/lib/netstub.a -o test.exe
$

这样还是报错:
$ esql test.c -L /home/informix/lib/netstub.a -o test.exe
gcc: unrecognized option '-brtl'
ld: 0706-006 Cannot find or open library file: -l netstub
        ldpen(): No such file or directory
collect2: ld returned 255 exit status

论坛徽章:
11
金牛座
日期:2015-03-19 16:56:22数据库技术版块每日发帖之星
日期:2016-08-02 06:20:00数据库技术版块每日发帖之星
日期:2016-04-24 06:20:00数据库技术版块每日发帖之星
日期:2016-04-13 06:20:00IT运维版块每日发帖之星
日期:2016-04-13 06:20:00数据库技术版块每日发帖之星
日期:2016-02-03 06:20:00数据库技术版块每日发帖之星
日期:2015-08-06 06:20:00季节之章:春
日期:2015-03-27 15:54:57羊年新春福章
日期:2015-03-27 15:54:37戌狗
日期:2015-03-19 16:56:41数据库技术版块每日发帖之星
日期:2016-08-18 06:20:00
6 [报告]
发表于 2012-12-21 15:19 |只看该作者
回复 5# CHY_CUG


    建议你改下esql的那文件。。。。估计有些参数在gcc中不支持。。

论坛徽章:
0
7 [报告]
发表于 2012-12-21 15:59 |只看该作者
怎么改呢?

论坛徽章:
0
8 [报告]
发表于 2012-12-24 10:02 |只看该作者
大侠能帮忙看下怎么改么?谢谢。

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2015-12-09 06:20:00
9 [报告]
发表于 2012-12-24 11:12 |只看该作者
回复 8# CHY_CUG


    then
    SLIB=${INFDIR}/lib/esql/libifsql.a
    GLIB=${INFDIR}/lib/esql/libifgen.a
    OLIB=${INFDIR}/lib/esql/libifos.a
    ALIB=${INFDIR}/lib/libifasf.a
    GLSLIB=${INFDIR}/lib/esql/libifgls.a
    GLXLIB=${INFDIR}/lib/esql/libifglx.a
    COMB="$OLIB $GLIB"
    NETSTUB=${INFDIR}/lib/netstub.a
else
    SLIB=-lifsql
    GLIB=-lifgen
    OLIB=-lifos
    ALIB=-lifasf
    GLSLIB=-lifgls
    GLXLIB=-lifglx
    NETSTUB="-lnetstub "
fi
你的esql中有这些么?

论坛徽章:
0
10 [报告]
发表于 2012-12-24 13:00 |只看该作者
回复 9# xinmencuoxue

有的。

# If libraries are added or removed make sure to update -libs option
if [ "x$STATOPT" != "x" ]
then
    SLIB=${INFDIR}/lib/esql/libifsql.a
    GLIB=${INFDIR}/lib/esql/libifgen.a
    OLIB=${INFDIR}/lib/esql/libifos.a
    ALIB=${INFDIR}/lib/libifasf.a
    GLSLIB=${INFDIR}/lib/esql/libifgls.a
    GLXLIB=${INFDIR}/lib/esql/libifglx.a
    COMB="$OLIB $GLIB"
    NETSTUB=${INFDIR}/lib/netstub.a
else
    SLIB=-lifsql
    GLIB=-lifgen
    OLIB=-lifos
    ALIB=-lifasf
    GLSLIB=-lifgls
    GLXLIB=-lifglx
    NETSTUB="-lnetstub "
fi


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP