Google

Wednesday, October 20, 2004

[PROGRAMMING] Tpinit failed --buildclent -w

我在服务器上使用客户端已经可以查询出数据库中的数据了,但是在其他的机器上,设置了环境变量WSNADDR=//10.31.202.248:6301,可是运行程序时提示:Tpinit failed错误?

客户端编译时加上-w 参数
-w
指定了当前的应用程序需要链接的库文件。

Tuxedo 提供两种客户端类型:Native client与Workstation client。在做buildclient的时候,两种类型的客户端程序链接的库文件是不一样的,所以用-w指定客户端是WS/C类型的,此类客户端的程 序在初始化的时候会自动读取环境变量WSNADDR的值,建立与服务器端的连接,当然这一切都是由Tuxedo自动完成的。

-w
specifies that the client is to be built using the workstation libraries. The default is to build a native client if both native mode and workstation mode libraries are available. This option cannot be used with the -r option.