0
点赞
收藏
分享

微信扫一扫

zeroc ice使用基础

zeroc ice

rpc接口调用,地址https://gitcode.net/daoer_sofu/ice.git

cpp/msbuild目录有windows vs项目,编译错误(检查slice2*程序是否优先生成,后面编译对exe有依赖,项目依赖项有问题)

client and server

预定义宏,ICE_CPP11_MAPPING使用c++11,undef使用c++98
的include目录缺少文件,使用生成的头文件generated/c++11/include、或者generated/c++98/include

client

	//Ice::CommunicatorHolder communicator;//可以输入配置参数
    Ice::CommunicatorPtr communicator;
    try{
        communicator = Ice::initialize();
        Ice::ObjectPrxPtr base = communicator->stringToProxy("server:tcp -h localhost -p 10091");
        AlgorithmIce::ServerPrxPtr alg = ICE_CHECKED_CAST(AlgorithmIce::ServerPrx,base);
        alg->Ask(1,"HelloWorld!");
    }catch (const Ice::
举报

相关推荐

0 条评论