omniORB 与vc6 集成设置

<Top-Level Directory>为安装目录。

    o 加 <Top-Level Directory>/bin/x86_win32 入    PATH 环境变量。

    o 设置环境变量OMNINAMES_LOGDIR 制定一个log目录。如:
          OMNINAMES_LOGDIR=C:/OMNINAMES

    o 启动命名服务     :
         omniNames -start

    o 双击sample.cfg。在注册表内生成样例条目。 在hkey_local_machine/software/omniorb/initref 下加 名为"1",值为      "NameService=corbaname::127.0.0.1" 

    o 注意:某些windows系统可能出现错误。原文:Due to a bug in some versions of Windows, omniORB may crash if      you have no entries in the SOFTWARE/omniORB key other than the
      InitRef sub-key. If this happens, set the name InitRef in the
      SOFTWARE/omniORB key, rather than using a sub-key, or add at
      least one configuration parameter to the SOFTWARE/omniORB key.

    o注册表条目必须被复制到所有运行omniORB programs的机器上. 确保网络内只有一个命名服务。

   

=================================

可以找到一个目录,来测试一下,如

  cd <Top-Level Directory>/src/examples/echo
  nmake /f dir.mak



==================================================

 omniORB and Visual C++ 5/6 集成

a) 加骨架文件入项目。the stub (*SK.cpp) files generated by the IDL compiler to the project
   (Insert->"Files into Project")

b) 设置include和lib路径。Set up the search paths for include and library files:

   1. Under Tools->Options, select the Directories tab.
   2. In the "Show directories for" box, select "Include files".
   3. Add the directory where you installed the omniORB include files to the
       list (this is <Top-Level Directory>/include).
   4. In the "Show directories for" box, select "Library files".
   5. Add the directory where you installed the omniORB library files to the
       list (this is <Top-Level Directory/lib/x86_win32).
   
c) 设置宏:

    1. Under Build->Settings, select the "C/C++" tab.
    2. In the "Category" box, select "C++ Language". Tick the
        "Enable exception handling" box.
    3. In the "Category" box, select "Code Generation". In the
        "Use run-time library" box, select "Multithreaded DLL".
    4. **This is an important step.** ****注意此处重要***
       In the "Category" box, select "Preprocessor". In the
       "Preprocessor" 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.
   
    5. Select the "Link" tab.

    6. In the "Category" box, select "Input". In the "Object/library
       modules" box, add the following libraries: ws2_32.lib,
       mswsock.lib, advapi32.lib, omniORB410_rt.lib,
       omniDynamic410_rt.lib, omnithread32_rt.lib

       If you are building a debug executable, the debug version of
       the libraries: omniORB410_rtd.lib, omniDynamic410_rtd.lib and
       omnithread32_rtd.lib should be used.

  现在,ok了。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值