求助:XE5 release 程序的时候连接错误

zl198183 2013-11-29 11:04:16
代码如下:

#include "System.RegularExpressionsCore.hpp"
TStrings * __fastcall TTools::LoadTNSNames(String OracleHomeRegistryKey) {
TStringList * DBNamesCollection = new TStringList;
String strTNSNAMESORAFilePath =
GetTNSNAMESORAFilePath(OracleHomeRegistryKey);

if (strTNSNAMESORAFilePath != "") {
// check out that file does physically exists
if (FileExists(strTNSNAMESORAFilePath)) {

String str;
// read tnsnames.ora file
int File, FileLength;
File = FileOpen(strTNSNAMESORAFilePath,
fmOpenRead | fmShareDenyNone); // 打开指定文件
FileLength = FileSeek(File, 0, 2); // 取文件长度
FileSeek(File, 0, 0);
char *pszBuffer = new char[FileLength + 1]; // 设pszBUffer的长度和文件的长度一致
FileRead(File, pszBuffer, FileLength); // 读文件
String WStr = pszBuffer;
TPerlRegEx *r = new TPerlRegEx();
r->Subject = WStr;
r->RegEx = "[\\n][\\s]*[^\\(][a-zA-Z0-9_.]+[\\s]*=[\\s]*\\(";
r->Replacement = "";
while (r->MatchAgain()) {
// ShowMessage(r->MatchedText.SubString(0,r->MatchedText.Pos(" ")));
DBNamesCollection->Add(r->MatchedText.SubString(0,
r->MatchedText.Pos(" ")).Trim());
}
r->Free();
delete[]pszBuffer;
}
}
else {
ShowMessage("请确认系统中已安装ORACLE客户端,并正确配置");
}
return DBNamesCollection;

}

release 时去掉动态链接和运行时Page,编译提示以下错误:
[ilink32 Error] Error: Unresolved external 'toupper' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'tolower' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'isupper' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'islower' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'isgraph' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'isprint' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'ispunct' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'iscntrl' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'isspace' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'isalpha' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'isdigit' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'isxdigit' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'isalnum' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'strchr' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'strncmp' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'memmove' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unresolved external 'memcmp' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\12.0\LIB\WIN32\RELEASE\RTL.LIB|System.RegularExpressionsAPI
[ilink32 Error] Error: Unable to perform link

求解决方法,高分送上!
...全文
311 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ccrun.com 2013-11-29
  • 打赏
  • 举报
回复
你这是窗体工程还是控制台工程? 代码中用到了VCL类, 所以, 你要确认创建的工程是使用VCL的(如控制台工程要选择Target Framework为VCL)
ccrun.com 2013-11-29
  • 打赏
  • 举报
回复
可能你把工程选项中需要包含的系统库给去掉了,如rtl.lib,建议重新建个新工程,再将你的单元加入编译链接就可以了。
zl198183 2013-11-29
  • 打赏
  • 举报
回复
创建的是窗体工程,不知道是什么问题,对XE5不熟悉啊.

13,870

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧