我正在尝试在 Ubuntu 12.04 上运行 C++ 中的 CORBA 示例: http ://www.yolinux.com/TUTORIALS/CORBA.html
当我尝试运行时仍然出现错误:
$ ./Server
'IOR:010000001600000049444c3a446174612f53657276696365413a312e3000000001000000000000006800000001010200100000003139322e3136382e3135392e31323900b1aa00000e000000fe4ba4015100001a19000000000000000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100'
Caught CORBA::SystemException.
在启动服务器之前,我生成了一个日志文件:
omniNames -start 2812 -logdir ~/Desktop -errlog ~/Desktop/omniNamesError.txt
这给了我一个文件 ~/Desktop/omniNamesError.txt 如下:
Thu Jan 24 22:54:34 2013:
Starting omniNames for the first time.
Wrote initial log file.
Read log file successfully.
Root context is IOR:010000002b00000049444c3a6f6d672e6f72672f436f734e616d696e672f4e616d696e67436f6e746578744578743a312e30000001000000000000007400000001010200100000003139322e3136382e3135392e31333000fd0a00000b0000004e616d6553657276696365000300000000000000080000000100000000545441010000001c0000000100000001000100010000000100010509010100010000000901010003545441080000009aad015101004982
Checkpointing Phase 1: Prepare.
Checkpointing Phase 2: Commit.
Checkpointing completed.
接下来我在文件中添加:
/etc/omniORB.cfg
生成文件中的行:
InitRef = NameService=IOR:000100010000000100010509010100010000000901010003545\
441080000005ea5015101002002010000002b00000049444c3a6f6d672e6f72672f436f734e61\
6d696e672f4e616d696e67436f6e746578744578743a312e30000001000000000000007400000\
001010200100000003139322e3136382e3135392e31333000fd0a00000b0000004e616d655365\
7276696365000300000000000000080000000100000000545441010000001c000000010000000\
1000100010000000100010509010100010000000901010003545441080000009aad0151010049\
82
我还设置了环境变量:
$ export OMNIORB_CONFIG=/etc/omniORB.cfg
教程中编写的所有内容,编译的文件(经过 2 次修改:我在 CRequestServiceA.cpp添加了: #include并将$(CC) $(CPPFLAGS) $(INCLUDES) DataSK.cc 更改为$(CC) $(CPPFLAGS ) $(INCLUDES) DataSK.cc && mv DataSK.o Data.o in MakeServer)但我仍然有一个错误,正如我所说的。
请帮我解决这个问题,我从许多 CORBA C++ 教程中学习,但没有任何效果