<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了。