ICE专题:编译环境构建
来源:互联网 发布:三众软件 编辑:程序博客网 时间:2024/05/20 15:37
ICE作为一种无平台的中间件,提供了最灵活的编译方式,即自定义的平台无关语言slice,这种以语言方式来配置的做法,极大的统一了网络服务的标准,有点类似于java语言的实现与编译,正是因为java语言的定义与实现都是由SUN公司提供的,才极大的推动了java语言的发发展。 在linux平台下编译比windows平台简单的多,必须要用g++ 3.x来编译ICE的开发包,否则会报错。在http://www.zeroc.com/download.html 中下载Ice-3.0.1.tar.gz和ThirdParty-Sources-3.0.1.tar.gz,先编译ThirdParty-Sources-3.0.1.tar.gz: 1、mkdir ThirdParty 2、cp ThirdParty-Sources-3.0.1.tar.gz ThirdParty 3、tar –xzvf ThirdParty-Sources-3.0.1.tar.gz 4、tar –xzvf openssl-0.9.8a.tar.gz 5、cd openssl-0.9.8a 6、./ Configure;make;make install 7、cd .. 8、tar –xzvf expat-1.95.8.tar.gz 9、cd expat-1.95.8 10、./ configure;make;make install 11、cd .. 12、tar –xzvf db-4.3.29.NC.tar.gz 13、cd db-4.3.29.NC 14、cd build_unix 15、../dist/configure;make;make install 16、cd ../.. 17、tar –xzvf Ice-3.0.1.tar.gz 18、cd Ice-3.0.1 19、将config文件夹下的Make.rules.Linux,将c++改为g++ 20、将config文件夹下的Make.rules里面的变量修改为第三方库的路径,找?号的是系统已经安装的,在linux下STL就是STLport不用另行安装。 #STLPORT_HOME ?= /opt/STLport # # If libbzip2 is not installed in a standard location where the compiler # can find it, set BZIP2_HOME to the bzip2 installation directory. # #BZIP2_HOME ?= /opt/bzip2 # # If Berkeley DB is not installed in a standard location where the # compiler can find it, set DB_HOME to the Berkeley DB installation # directory. # #DB_HOME = /root2/opt/db # # If OpenSSL is not installed in a standard location where the # compiler can find it, set OPENSSL_HOME to the OpenSSL installation # directory. # OPENSSL_HOME = /root2/opt/openssl # # Define if your OpenSSL requires Kerberos, and if Kerberos is not # installed in a standard location. # KERBEROS_HOME ?= /usr/kerberos # # If expat is not installed in a standard location where the # compiler can find it, set EXPAT_HOME to the expat # installation directory. # EXPAT_HOME = /root2/opt/expat # # If readline is not installed in a standard location where the # compiler can find it, AND you want to use readline, # set READLINE_HOME to the readline installation directory. # # #READLINE_HOME ?= /opt/readline 21、make;make install 这样ICE就可以编译过去了,可以用make test来测试编译得是否正确。 在windows平台上安装ICE比较简单,就是VC设置麻烦些。因为我用的是VC6.0,但用VC7.0和8.0都有相对应的包,安装步骤是一样的。 首先从http://www.zeroc.com/download.html下载ThirdParty-3.0.1-VC60.msi和Ice-3.0.1-VC60.msi,直接安装。 打开VC6.0,在include和lib设置时,在include中加入Ice-3.0.1-ThirdParty-VC60/include/stl_port和Ice-3.0.1-VC60/include。同理在lib中加入Ice-3.0.1-ThirdParty-VC60/lib和Ice-3.0.1-VC60/lib 将Ice-3.0.1-ThirdParty-VC60/include和Ice-3.0.1-ThirdParty-VC60/lib放在第一行,否则编译STL的时候还是没有用STL_port,就会编译失败。 在编译console类型的程序时,要将Porject->setting->c/c++->code gereration中的Use run-time library中的Debug Multithreaded DLL选上,实现多线程,因为ICE本身天生就是多线程的。 在任何情况下编译ICE程序,都要将Porject->setting->C++ Language中的Enable Run-Time Type Information (RTTI)选中,否则STL_port会报Access violation - no RTTI data In Visual Studio (Visual C++)错误。 这样,两种平台上的ICE都安装完毕,可以用Demo来测试环境。
- ICE专题:编译环境构建
- ICE专题:ICE简介
- linux环境下编译安装ICE
- ICE专题:ICE实现聊天室
- ICE专题:学习ICE 3.0
- EditPlus构建编译环境
- 构建MiniGUI编译环境
- 构建JAVA编译环境
- 构建交叉编译环境
- 编译ICE
- ICE专题:JDBC桥接器
- 微服务:ICE 入门之 编译环境搭建
- ICE专题:ICE的5个服务
- Java编译环境的构建
- 构建安全的编译环境
- Linux交叉编译环境构建
- 构建powerpc交叉编译环境
- 交叉编译构建环境搭建
- Java程序员的推荐阅读书籍
- MiniGui演示程序常见错误
- 利用VS2005创建WINCE 6.0平台
- liferay5.0.1用户登录后的跳转
- 送礼物送什么好
- ICE专题:编译环境构建
- 终端下的俄罗斯方块游戏tetris
- ICE专题:网络服务平台比较
- 详细解说STL hash_map系列
- ICE专题:反叛之冰 Internet Communications Engine
- myEclipse 中文 乱码
- crontab举例
- ICE专题:实战分布式的Hello Word
- liferay5.0.1 用户登录