I define BusAttendance.Ice, as follow:
#ifndef BUS_ATTENDANCE_ICE
#define BUS_ATTENDANCE_ICE
module CoachStation
{
struct BusAttendanceItem
{
["cpp:type:wstring"] string busNumber;
["cpp:type:wstring"] string departDatetime;
["cpp:type:wstring"] string actualBus;
["cpp:type:wstring"] string destination;
bool isFlow;
["cpp:type:wstring"] string signedDatetime;
};
sequence<BusAttendanceItem> BusAttendanceSeq;
interface BusAttendance
{
BusAttendanceSeq getBusAttendances(long now,int intervals);
idempotent void sayHello(int delay);
void shutdown();
};
};
#endif
When I remove all metadata directives: ["cpp:type:wstring"] , my application works fine,but when I add these directives, the VC+ 2008 SP1 compiler complains :
1>BusAttendance.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __thiscall IceInternal::BasicStream::write(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)" (__imp_?write@BasicStream@IceInternal@@QAEXABV?$ba sic_string@GU?$char_traits@G@std@@V?$allocator@G@2 @@std@@@Z),该符号在函数 "public: void __thiscall CoachStation::BusAttendanceItem::__write(class IceInternal::BasicStream *)const " (?__write@BusAttendanceItem@CoachStation@@QBEXPAVB asicStream@IceInternal@@@Z) 中被引用
1>BusAttendance.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __thiscall IceInternal::BasicStream::read(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > &)" (__imp_?read@BasicStream@IceInternal@@QAEXAAV?$bas ic_string@GU?$char_traits@G@std@@V?$allocator@G@2@ @std@@@Z),该符号在函数 "public: void __thiscall CoachStation::BusAttendanceItem::__read(class IceInternal::BasicStream *)" (?__read@BusAttendanceItem@CoachStation@@QAEXPAVBa sicStream@IceInternal@@@Z) 中被引用
Any suggestion I appreciate.

Reply With Quote