程序调试中出现如下错误提示:
程序如下:
#include <vcl.h>
#pragma hdrstop
#include"add.h"
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
add();
Memo1->Lines->LoadFromFile("F:\\add.txt");
}
//------------------------------------------
其中matlab编译的m文件内容如下;
function add()
x1=3;
x2=6;
y=x1+x2;
fid=fopen('F:\add.txt','w+');
fprintf(fid,'%f',y);
status=fclose('all');
将其编译为dll文件,并在工程目录下添加了该dll文件和lib文件及所需的头文件,请各位大神看看是何原因??急!!等待中…………