根据idl可以编译出通信使用的DLL,也同时可以编译出“发布者”和“订阅者”作为测试使用,修改mpc文件就可以;
project(*Publisher) : dcpsexe, dcps_tcp, svc_utils {
after += *Common
exename = publisher
requires += tao_orbsvcs
requires += no_opendds_safety_profile
includes += $(TAO_ROOT)/orbsvcs
libs += TranslateDataCommon
IDL_Files {
}
TypeSupport_Files {
TranslateData.idl
}
Header_Files {
}
Source_Files {
publisher.cpp
}
Documentation_Files {
}
}
project(*Subscriber) : dcpsexe, dcps_tcp {
after += *Common
exename = subscriber
requires += tao_orbsvcs
requires += no_opendds_safety_profile
includes += $(TAO_ROOT)/orbsvcs
libs += TranslateDataCommon
TypeSupport_Files {
TranslateData.idl
}
IDL_Files {
}
Header_Files {
}
Source_Files {
subscriber.cpp
}
Documentation_Files {
}
}
同样使用perl生成工程文件,打开sln就可以看到多了两个项目:
但是里面的源码文件却没有内容,需要自己添加上!
aaa