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
政府科技管理者在推动科技成果转化过程中,政策审核环节存在哪些难点?.docx
政府科技管理者在推动科技成果转化过程中,政策审核环节存在哪些难点?
声学通信!多尺度-多滞后信道!水下作战!水下声学通道中的通信信号周期统计特性研究(Matlab代码实现)
内容概要:本文围绕水下声学通信中的多尺度-多滞后信道特性,系统研究了通信信号在复杂海洋环境下的周期统计特性,并提供了完整的Matlab代码实现方案。研究深入分析了多径效应、时变信道、多普勒扩展等物理因素对信号周期性的影响,构建了能够反映实际水下信道特征的数学模型,通过时频分析与统计信号处理方法提取信号的周期性特征,为水下作战背景下的通信系统设计与干扰抑制提供了理论依据和技术支撑。研究内容涵盖信号建模、信道仿真、周期性检测与特征提取,强调理论分析与仿真实践的紧密结合; 适合人群:具备信号处理、通信原理及海洋声学基础知识的研究生、科研人员以及从事水下通信、军事通信、声呐系统开发等相关领域的工程技术人员; 使用场景及目标:①支撑水下声学通信系统的设计与性能优化,提升通信可靠性;②实现水下作战环境中通信信号的周期性识别与抗干扰能力增强;③为多尺度-多滞后时变信道的建模、仿真与性能评估提供Matlab实现范例与技术参考; 阅读建议:建议结合所提供的Matlab代码深入理解信道建模与信号周期性分析的具体实现过程,重点关注多普勒频移与多径时延的联合影响机制,建议通过调整信道参数进行仿真实验,观察不同海洋环境下信号统计特性的变化规律,以深化对理论模型的理解与工程应用能力。
NSGA-II-NURBS-main.zip
NSGA-II-NURBS-main.zip


