Ubuntu 安装Tuxedo 编译Client 报错 undefined reference to `dlopen'

在Ubuntu上编译Tuxedo Client时遇到undefined reference to `dlopen'等错误。问题源于Ubuntu对共享库链接方式的改变,不兼容其他发行版。为解决此问题,可以尝试在buildclient命令中添加链接器选项`--no-as-needed`,例如:`buildclient -o simpcl -f "-Xlinker --no-as-needed simpcl.c"`。虽然不推荐,但该方法可以缓解编译错误。
摘要由CSDN通过智能技术生成

Ubuntu 安装Tuxedo 编译Client

buildclient -o simpcl -f simpcl.c
simpcl.c: 在函数‘main’中:
simpcl.c:34:3: 警告: 隐式声明与内建函数‘exit’不兼容 [默认启用]
simpcl.c:40:3: 警告: 隐式声明与内建函数‘exit’不兼容 [默认启用]
simpcl.c:43:12: 警告: 隐式声明与内建函数‘strlen’不兼容 [默认启用]
simpcl.c:50:3: 警告: 隐式声明与内建函数‘exit’不兼容 [默认启用]
simpcl.c:57:3: 警告: 隐式声明与内建函数‘exit’不兼容 [默认启用]
simpcl.c:60:9: 警告: 隐式声明与内建函数‘strcpy’不兼容 [默认启用]
simpcl.c:71:3: 警告: 隐式声明与内建函数‘exit’不兼容 [默认启用]
/opt/tuxedo/tuxedo11gR1/lib/libengine.so: undefined reference to `dlopen'
/opt/tuxedo/tuxedo11gR1/lib/libengine.so: undefined reference to `dlclose'
/opt/tuxedo/tuxedo11gR1/lib/libengine.so: undefined reference to `dlerror'
/opt/tuxedo/tuxedo11gR1/lib/libengine.so: undefined reference to `dlsym'

 

 

通过查询:https://forums.oracle.com/forums/thread.jspa?threadID=2344582

 

This problem is caused because Ubuntu is not a supported platform and Oneric has made some substantial changes to how shared libraries must be linked, and this change is not backward compatible with other distributions such as RedHat and its derivatives. Although not recommended, you should be able to fix this by adding the linker option --no-as-needed. To do this with buildclient, you would use a command like:

 

buildclient -o simpcl -f "-Xlinker --no-as-needed simpcl.c"
simpcl.c: 在函数‘main’中:
simpcl.c:34:3: 警告: 隐式声明与内建函数‘exit’不兼容 [默认启用]
simpcl.c:40:3: 警告: 隐式声明与内建函数‘exit’不兼容 [默认启用]
simpcl.c:43:12: 警告: 隐式声明与内建函数‘strlen’不兼容 [默认启用]
simpcl.c:50:3: 警告: 隐式声明与内建函数‘exit’不兼容 [默认启用]
simpcl.c:57:3: 警告: 隐式声明与内建函数‘exit’不兼容 [默认启用]
simpcl.c:60:9: 警告: 隐式声明与内建函数‘strcpy’不兼容 [默认启用]
simpcl.c:71:3: 警告: 隐式声明与内建函数‘exit’不兼容 [默认启用]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值