求助:VC++6.0编译时出错 求教高手帮助解答 急用
俺这有一个程序 似乎是VC6.0与matlab的混编程序,源文件如下:/ chuandongxi.cpp : implementation file
//
#include "stdafx.h"
#include "QICHEDONGLIJINGJIXING.h"
#include "chuandongxi.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Cchuandongxi dialog
Cchuandongxi::Cchuandongxi(CWnd* pParent /*=NULL*/)
: CDialog(Cchuandongxi::IDD, pParent)
{
//{{AFX_DATA_INIT(Cchuandongxi)
//}}AFX_DATA_INIT
}
void Cchuandongxi::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Cchuandongxi)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Cchuandongxi, CDialog)
//{{AFX_MSG_MAP(Cchuandongxi)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
ON_BN_CLICKED(IDC_BUTTON4, OnButtonWAITEXING)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Cchuandongxi message handlers
void Cchuandongxi::OnButton1()
{ mxArray *in1,*in2,*in3,*in4,*in5;
in1=mxCreateDoubleMatrix(1,6,mxREAL);
in2=mxCreateDoubleMatrix(1,14,mxREAL);
in3=mxCreateDoubleMatrix(1,6,mxREAL);
in4=mxCreateDoubleMatrix(1,6,mxREAL);
in5=mxCreateDoubleMatrix(1,1,mxREAL);
double m=4;
double *dangg6h;
dangg6h=new double[6];
dangg6h[0]=dang6h[0];
dangg6h[1]=dang6h[1];
dangg6h[2]=dang6h[2];
dangg6h[3]=dang6h[3];
dangg6h[4]=dang6h[4];
dangg6h[5]=dang6h[5];
memcpy(mxGetPr(in1),lihejieshu,6*sizeof(double));
memcpy(mxGetPr(in2),datalinshi,14*sizeof(double));
memcpy(mxGetPr(in3),dangg6h,6*sizeof(double));
memcpy(mxGetPr(in4),dang6q,6*sizeof(double));
memcpy(mxGetPr(in5),&m,1*sizeof(double));
mlfDonglixingtuxing(in1,in2,in3,in4,in5);
}
void Cchuandongxi::OnButtonWAITEXING()
{
mxArray *in1,*in2,*in3,*in4,*in5;
in1=mxCreateDoubleMatrix(1,6,mxREAL);
in2=mxCreateDoubleMatrix(1,14,mxREAL);
in3=mxCreateDoubleMatrix(1,6,mxREAL);
in4=mxCreateDoubleMatrix(1,6,mxREAL);
in5=mxCreateDoubleMatrix(1,1,mxREAL);
double m=1;
double *dangg6h;
dangg6h=new double[6];
dangg6h[0]=dang6h[0];
dangg6h[1]=dang6h[1];
dangg6h[2]=dang6h[2];
dangg6h[3]=dang6h[3];
dangg6h[4]=dang6h[4];
dangg6h[5]=dang6h[5];
memcpy(mxGetPr(in1),lihejieshu,6*sizeof(double));
memcpy(mxGetPr(in2),datalinshi,14*sizeof(double));
memcpy(mxGetPr(in3),dangg6h,6*sizeof(double));
memcpy(mxGetPr(in4),dang6q,6*sizeof(double));
memcpy(mxGetPr(in5),&m,1*sizeof(double));
mlfDonglixingtuxing(in1,in2,in3,in4,in5);
}
void Cchuandongxi::OnButton2()
{
mxArray *in1,*in2,*in3,*in4,*in5;
in1=mxCreateDoubleMatrix(1,6,mxREAL);
in2=mxCreateDoubleMatrix(1,14,mxREAL);
in3=mxCreateDoubleMatrix(1,6,mxREAL);
in4=mxCreateDoubleMatrix(1,6,mxREAL);
in5=mxCreateDoubleMatrix(1,1,mxREAL);
double m=2;
double *dangg6h;
dangg6h=new double[6];
dangg6h[0]=dang6h[0];
dangg6h[1]=dang6h[1];
dangg6h[2]=dang6h[2];
dangg6h[3]=dang6h[3];
dangg6h[4]=dang6h[4];
dangg6h[5]=dang6h[5];
memcpy(mxGetPr(in1),lihejieshu,6*sizeof(double));
memcpy(mxGetPr(in2),datalinshi,14*sizeof(double));
memcpy(mxGetPr(in3),dangg6h,6*sizeof(double));
memcpy(mxGetPr(in4),dang6q,6*sizeof(double));
memcpy(mxGetPr(in5),&m,1*sizeof(double));
mlfDonglixingtuxing(in1,in2,in3,in4,in5);
}
void Cchuandongxi::OnButton3()
{
mxArray *in1,*in2,*in3,*in4,*in5;
in1=mxCreateDoubleMatrix(1,6,mxREAL);
in2=mxCreateDoubleMatrix(1,14,mxREAL);
in3=mxCreateDoubleMatrix(1,6,mxREAL);
in4=mxCreateDoubleMatrix(1,6,mxREAL);
in5=mxCreateDoubleMatrix(1,1,mxREAL);
double m=3;
double *dangg6h;
dangg6h=new double[6];
dangg6h[0]=dang6h[0];
dangg6h[1]=dang6h[1];
dangg6h[2]=dang6h[2];
dangg6h[3]=dang6h[3];
dangg6h[4]=dang6h[4];
dangg6h[5]=dang6h[5];
memcpy(mxGetPr(in1),lihejieshu,6*sizeof(double));
memcpy(mxGetPr(in2),datalinshi,14*sizeof(double));
memcpy(mxGetPr(in3),dangg6h,6*sizeof(double));
memcpy(mxGetPr(in4),dang6q,6*sizeof(double));
memcpy(mxGetPr(in5),&m,1*sizeof(double));
mlfDonglixingtuxing(in1,in2,in3,in4,in5);
}
我在用VC++6.0来编译它时,报出了如下错误:
chuandongxi.obj : error LNK2001: unresolved external symbol _mlfDonglixingtuxing
chuandongxi.obj : error LNK2001: unresolved external symbol "double * dang6q" (?dang6q@@3PANA)
chuandongxi.obj : error LNK2001: unresolved external symbol "double * datalinshi" (?datalinshi@@3PANA)
chuandongxi.obj : error LNK2001: unresolved external symbol _mxGetPr
chuandongxi.obj : error LNK2001: unresolved external symbol "double * lihejieshu" (?lihejieshu@@3PANA)
chuandongxi.obj : error LNK2001: unresolved external symbol "double * dang6h" (?dang6h@@3PANA)
chuandongxi.obj : error LNK2001: unresolved external symbol _mxCreateDoubleMatrix
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
libcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/chuandongxi.exe : fatal error LNK1120: 10 unresolved externals
执行 link.exe 时出错.
急需求教高手帮忙, 如何解决这一问题?