tuxedo12.1.1.0 libtux导出函数的错误

      最近在学习tuxedo,想在以前用MFC写的系统中运用tuxedo,虽然tuxedo一般用在linux系统中,但其实在开发使用tuxedo中间件的三层架构应用系统中,表示层也经常采用windows风格的程序,由于tuxedo的跨平台特性,便可以把后台应用逻辑运行在unix平台下。

     于是在oracle官网上下载了tuxedo12110_64_win_2k8_x86_VS2010.exe,这个是windows上最新的版本,安装好后,便开始使用里面的那个simpapp的例子测试下是否可以使用。

    例子中客户端源程序如下:    

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include "atmi.h"		/* TUXEDO  Header File */

int main(int argc,char *argv[])
{
	char *sendbuf, *rcvbuf;
	long sendlen, rcvlen;
	int ret;

	if(argc != 2) {
		(void) fprintf(stderr, "Usage: simpcl string\n");
		exit(1);
	}

	/* Attach to System/T as a Client Process */
	if (tpinit((TPINIT *) NULL) == -1) {
		(void) fprintf(stderr, "Tpinit failed\n");
		exit(1);
	}
	
	sendlen = strlen(argv[1]);

	/* Allocate STRING buffers for the request and the reply */

	if((sendbuf = (char *) tpalloc("STRING", NULL, sendlen+1)) == NULL) {
		(void) fprintf(stderr,"Error allocating send buffer\n");
		tpterm();
		exit(1);
	}

	if((rcvbuf = (char *) tpalloc("STRING", NULL, sendlen+1)) == NULL) {
		(void) fprintf(stderr,"Error allocating receive buffer\n");
		tpfree(sendbuf);
		tpterm();
		exit(1);
	}

	(void) strcpy(sendbuf, argv[1]);

	/* Request the service TOUPPER, waiting for a reply */
	ret = tpcall("TOUPPER", (char *)sendbuf, 0, (char **)&rcvbuf, &rcvlen, (long)0);

	if(ret == -1) {
		(void) fprintf(stderr, "Can't 
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值