BCB 编写dll文件时出现:[Linker Error] Unresolved external '__stdcall System::AnsiString:
#include <vcl.h>
#include <windows.h>
#pragma hdrstop
//---------------------------------------------------------------------------
// Important note about DLL memory management when your DLL uses the
// static version of the RunTime Library:
//
// If your DLL exports any functions that pass String objects (or structs/
// classes containing nested Strings) as parameter or function results,
// you will need to add the library MEMMGR.LIB to both the DLL project and
// any other projects that use the DLL. You will also need to use MEMMGR.LIB
// if any other projects which use the DLL will be performing new or delete
// operations on any non-TObject-derived classes which are exported from the
// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling
// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases,
// the file BORLNDMM.DLL should be deployed along with your DLL.
//
// To avoid using BORLNDMM.DLL, pass string information using "char *" or
// ShortString parameters.
//
// If your DLL uses the dynamic version of the RTL, you do not need to
// explicitly add MEMMGR.LIB as this will be done implicitly for you
//---------------------------------------------------------------------------
#pragma argsused
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
{
return 1;
}
//---------------------------------------------------------------------------
extern "C" __declspec(dllexport) AnsiString __stdcall PassWord(AnsiString cz0003_6,int cz0003_a)
{// 字符串加解密处理函数
// 参数说明:cz0003_6 --- 待处理字符串
// cz0003_a --- 处理方式(1.加密;-1.解密)
AnsiString cz0003_0,cz0003_1,cz0003_2,cz0003_3,cz0003_4,cz0003_8;
int cz0003_7,cz0003_5,cz0003_9;
AnsiString s1,s2;
int j=0;
cz0003_0="#$%$%$^%#%$DF^RDTYDCJV<P)*_)(*^&%^$%EDCFFVC GHGR^&FV#!@#$$^%&^(*)_ZXCVBNM<>>?<>";
cz0003_1="1203.645987987ZXNFDADUQRETYPU]IO[]I'\K;G'HJLG'./,NXJKBqwepwqort][po=-=009886723465";
cz0003_2="186548641618bfsiudfhsdZQWSQYHEWDIOUFPQPOWERUWEIOFHONFDLK;DSBVZVBSBDGFVSDLGIOSDHG";
//cz0003_3="版本 Ver 1.0";
cz0003_4=cz0003_0 + cz0003_1 + cz0003_2; // 加密字符串
cz0003_5=cz0003_4.Length(); // 加密字符串长度
cz0003_8=""; // 加密后的字符串
cz0003_9=0;
if(cz0003_a==-1)
{
for(cz0003_7=1;cz0003_7<=cz0003_6.Length();cz0003_7++)
{
//s1:=copy(cz0003_6,cz0003_7,1);
s1 = cz0003_6.SubString(cz0003_7,1);
//s2:=copy(cz0003_4,(cz0003_7-1) mod cz0003_5+1,1);
if(cz0003_7/2==0)
{
s2 = cz0003_4.SubString((cz0003_7-1) % cz0003_5+2,1);
}
else if(cz0003_7/3==0)
{
s2 = cz0003_4.SubString((cz0003_7-1) % cz0003_5+3,1);
}
else
{
s2 = cz0003_4.SubString((cz0003_7-1) % cz0003_5+1,1);
}
cz0003_9=int(s1[1])-int(s2[1]);
if(cz0003_9<0)
cz0003_8=cz0003_8+String(char(cz0003_9+256));
else
cz0003_8=cz0003_8+String(char(cz0003_9));
}
}
else
{
// 加密运算
for(cz0003_7=1;cz0003_7<=cz0003_6.Length();cz0003_7++)
{
s1=cz0003_6.SubString(cz0003_7,1);
if(cz0003_7/2==0)
{
s2=cz0003_4.SubString((cz0003_7-1) % cz0003_5+2,1);
}
else if(cz0003_7/3==0)
{
s2=cz0003_4.SubString((cz0003_7-1) % cz0003_5+3,1);
}
else
{
s2=cz0003_4.SubString((cz0003_7-1) % cz0003_5+1,1);
}
cz0003_9=int(s1[1])+int(s2[1]);
if(cz0003_9>255)
cz0003_8=cz0003_8+String(char(cz0003_9-256));
else
cz0003_8=cz0003_8+String(char(cz0003_9));
//j++;
}
}
cz0003_6=cz0003_8;
return cz0003_8;
}
以上代码是我在写DLL文件时的源码,按Ctrl+F9编译时出现一个错误:[Linker Error] Unresolved external '__stdcall System::AnsiString::ThrowIfOutOfRange(int) const' referenced from C:\DOCUMENTS AND SETTINGS\CBC\桌面\BCB DLL文件2\UNIT1.OBJ 。请问该问题怎么解决呢?
注:进入DLL wizard 我选的是C++
相关推荐
[Linker Error] Unresolved external 问题的解决方法
BCB里遇到过的问题 [Linker Error] Unresolved external 'mysql_init' referenced from C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR.LXSERVER\桌面\TESTINSERTMYSQL\UNIT1.OBJ 的解决方案
EhLib 8.0 Build 8.0.023 Pro Edition FullSource for D7-XE8
EhLib 8.0 Build 8.0.023 Pro Edition FullSource for D7-XE8 亲测可用,含全部源码及 Demo The Library contains components and classes for Borland Delphi versions 7, 9, Developer Studio 2006, Delphi 2007, Embarcadero RAD Studio 2009-XE8, Lazarus. TABLE OF CONTENTS ----------------- Overview Installation Library Installation Help Demonstration Programs Registering and Prices Other information About author Where to start. ------------------- Read about EhLib for Lazarus in the file - Lazarus\readme.txt Start overview of the library with the main Demo project .\Demos\Bin\MainDemo.Exe. (Compiled Demo files are available in the Evaluation version of the library) Then you can read a summary of the new features and changes in the file history-eng.html. More detail about new features can be found in the file - About EhLib 8 Eng.doc To install a new version of the library in the IDE, use the installation program in .\Installer\EhLibInstaller.exe Overview -------- The Library contains several components and objects. TDBGridEh component TDBGridEh provides all functionality of TDBGrid and adds several new features as follows: Allows to select records, columns and rectangle areas. Special titles that can correspond to several/all columns. Footer that is able to show sum/count/other field values. Automatic column resizing to set grid width equal client width. Ability to change row and title height. Allows automatic broken of a single line long title and data row to a multiline. Title can act as button and, optionally show a sort marker. Automatically sortmarking. Ability to truncate long text with ellipsis. Lookup list can show several fields. Incremental search in lookup fields. Frozen columns. DateTime picker support for TDateField and TDateTimeField. Allows to show bitmaps from TImageList depending on field value. Allows to hide and track horizontal or vertical scrollbars. Allows to hide columns. Allows to show 3D fr
基于统一环境建模与可行性约束一致化的三维路径规划A星RRT星与粒子群优化对比研究(Matlab代码实现)
内容概要:本文系统研究了基于统一环境建模与可行性约束一致化的三维路径规划问题,对A*算法、RRT*算法与粒子群优化(PSO)算法在三维空间中的路径规划性能进行了深入对比分析。通过构建标准化的仿真环境与统一的可行性约束条件,从路径长度、规划耗时、避障能力及路径平滑性等多个维度对三种算法进行定量评估,全面揭示其各自的优势与局限性。研究旨在为不同应用场景下的路径规划算法选型提供科学依据与技术指导,并配套提供了完整的Matlab代码实现,便于读者复现结果与进一步研究。; 适合人群:具备一定算法基础和Matlab编程能力,从事机器人、自动驾驶、无人机或智能系统等相关领域研究的研发人员及研究生。; 使用场景及目标:① 掌握A*、RRT*、PSO等主流路径规划算法的核心思想与实现细节;② 学习如何在统一标准下对不同算法进行公平、有效的性能对比与评估;③ 获取可直接用于科研或项目开发的三维路径规划Matlab代码框架。; 阅读建议:建议读者在阅读过程中结合提供的Matlab代码进行实践操作,通过修改环境参数和算法配置来观察不同算法的表现差异,从而加深对算法原理与适用场景的理解。
YOLO26算法城市道路车辆与行人目标检测+训练好的模型+261张数据集+pyqt可视化界面.zip
附训练好的 YOLO 权重与 PyQt 可视化检测界面,页面底部含可视化效果预览,毕设/课设开箱即用。 【数据集概况】 · 检测类别(中文):[路障(barrier), 自行车(bicycle), 公交车(bus), 小汽车(car), 施工车辆(construction_vehicle), 摩托车(motorcycle), 行人(pedestrian), 交通锥(traffic_cone), 拖车(trailer), 卡车(truck)] · 总计:261 张 · 测试集:44 张 · 验证集:146 张 · 训练集:71 张 【训练曲线与评估图】 【模型训练配置】 参数 | 值 模型 | yolo26n 训练轮数 | 100 epochs 输入尺寸 | 640x640 批次大小 | 24 优化器 | auto 初始学习率 | 0.01 训练设备 【关键指标汇总】 训练了 92 个 epoch,最终轮指标: 指标 | 数值 mAP50 | **0.1446** mAP50-95 | 0.0706 Precision | 0.4273 Recall | 0.1741 train/box_loss | 2.0121 train/cls_loss | 2.1335 val/box_loss | 2.1985 val/cls_loss | 2.2913 【训练过程分析】 这轮训练从一开始就没有给我太多惊喜。训练曲线显示,train/box_loss 和 train/cls_loss 都在前 40 轮快速下降,这让我一度觉得模型很快就能收敛,然而后续的曲线却让我感到有些无奈。从第 41 轮开始,train/box_loss 只是在缓慢下降,而 train/cls_loss 则一直保持在一个较高的水平,这表明模型在... 使用场景:毕业设计、课程设计、深度学习入门、工业场景落地验证。
Univer 是一款 Office SDK,用于在你自己的产品内构建办公应用
Univer 是一套企业级文档与数据协作解决方案,涵盖电子表格、文档和幻灯片。其高度可扩展的设计使得开发者能够基于 Univer 定制个性化的功能


