开源CORBA OmniORB开发环境搭建及编译问题解决方法

来源:互联网 发布:办公用品库存软件 编辑:程序博客网 时间:2024/05/15 23:48

利用omniORB编译corba应用程序 c++,该怎么解决

利用omniORB编译corba应用程序 c++
知道的朋友都请进
最近在学corba,利用omniORB来编译应用程序,运行平台是vs2005。安装的是omniORB4.1.3_x86_win32_vs8.zip.路径已经配置过,编译环境、预处理器、引用文件也已经配置过。
之后过程如下:
编写idl文件,命名为time.idl 利用omniidl编译idl文件,生成time.hh和timeSK.cc,之后编写服务端程序 ,就是在编译这个程序的时候,出现了以下错误:
1>time_sever.cpp
1>e:\graduate class\2008-2009下\middleware\assignment\third\omniorb-4.1.3\include\omniorb4\corba_sysdep_trad.h(605): fatal error C1189: #error : "The byte order of this platform isunknown"
1>timeSK.cc
1>e:\graduate class\2008-2009下\middleware\assignment\third\omniorb-4.1.3\include\omniorb4\corba_sysdep_trad.h(605): fatal error C1189: #error : "The byte order of this platform isunknown"

这个问题已经困扰我好多天了 网上搜过解决办法,似乎只有国外网站才有解决办法,也给国外相关技术人员发过邮件,但是还没有回音,很是着急。所以请各位帮帮忙 解决这个问题,共同进步!

------解决方案--------------------
帮顶 
------解决方案--------------------
帮顶 
------解决方案--------------------
源码里搜"The byte order of this platform is unknown",记得应该是有宏没有定义 
------解决方案--------------------
Set up macros and libraries:

1. Under Project Properties ->Settings, Select the "C/C++" tab.
2. Select The Code Generaion Tab:
3. Set "Enable exception Handling" To Yes
4. Set Run-Time Library To "Mulithreaded DLL".  
5. **This is an important step.** 
Select The Code Generaion Tab: (Under C++ in project properties)
  
In the Preprocessor Definitions Box Add The Macros:

__WIN32__,__x86__,_WIN32_WINNT=0x0400

If this is NT 4.0, Windows 2000 or XP (or something later), add
the macros __NT__ and __OSVERSION__=4 as well.

6. Expand The Linker Tab.
7. Select The Input Tab
8. add The following Libraries to "Additional Dependencies"

ws2_32.lib, mswsock.lib, advapi32.lib, omniORB404_rt.lib,
omniDynamic404_rt.lib, omnithread30_rt.lib

If you are building a debug executable, the debug version of
the libraries: omniORB404_rtd.lib, omniDynamic404_rtd.lib and
omnithread30_rtd.lib should be used.

 

0 0