gpt4 book ai didi

c++ - TDateTime 链接错误

转载 作者:行者123 更新时间:2023-11-28 07:57:33 26 4
gpt4 key购买 nike

我正在使用 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 链接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12383775/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com