我正在使用C ++ Builder,并且遇到以下错误:
[ILINK32 Error] Error: Unresolved external '__fastcall System::Internal::Strhlpr::UnicodeFree(System::UnicodeString&)' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\9.0\LIB\WIN32\DEBUG\VCLE.LIB|ustring
[ILINK32 Error] Error: Unresolved external '__fastcall System::Internal::Strhlpr::UnicodeFromPChar(System::UnicodeString&, char *, bool)' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\9.0\LIB\WIN32\DEBUG\VCLE.LIB|ustring
[ILINK32 Error] Error: Unresolved external '__fastcall System::Sysutils::StrToDateTime(const System::UnicodeString)' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\9.0\LIB\WIN32\DEBUG\VCLE.LIB|datetime
[ILINK32 Error] Error: Unresolved external '__fastcall System::Sysutils::StrToDate(const System::UnicodeString)' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\9.0\LIB\WIN32\DEBUG\VCLE.LIB|datetime
[ILINK32 Error] Error: Unresolved external '__fastcall System::Syncobjs::TInterlocked::Increment(int&)' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\9.0\LIB\WIN32\DEBUG\VCLE.LIB|ustring
[ILINK32 Error] Error: Unresolved external '__fastcall System::Sysutils::StrToTime(const System::UnicodeString)' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\9.0\LIB\WIN32\DEBUG\VCLE.LIB|datetime
[ILINK32 Error] Error: Unable to perform link
这是我的主要代码:
int _tmain(int argc, _TCHAR* argv[])
{
//TDateTime Mine("12/05/1990",TDateTime::TDateTimeFlag::Date);
TDateTime Mine("12/05/1990");
getch();
return 0;
}
而且我包括了“ vcl.h”
我该怎么做才能使它正常工作?
最佳答案
如今,我不使用Borland / Embarcadero工具,但我想您会因为链接器报告而忘记链接到vcle.lib。
似乎TDateTime
构造函数使用在vcle.lib中实现的Sysutils::StrToDateTime()
。
将vcle.lib添加到链接器设置,然后查看它是否生成。可以在Project Options > Linker
中修改链接器设置
关于c++ - TDateTime LinkError,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/12383775/