如果在idl中直接使用sequence<string>,并把这个idl生成的代码编译成dll,编译时会产生如下的错误
ACE_wrappers\TAO\tao/StringSeqC.h(140) : error C2961: 'TAO::unbounded_basic_string_sequence<charT>' : inconsistent explicit instantiations, a previous explicit instantiation did not specify '__declspec(dllimport)'
1> with
1> [
1> charT=char
1> ]
解决办法
在idl的前面增加一行
#include "tao/StringSeq.pidl"
即可。