调用matlab dll报错,调用matlab的dll代码报错,那里的符号重定义了,求指导(2)

当前位置:我的异常网» VC/MFC » 调用matlab的dll代码报错,那里的符号重定义了,求

调用matlab的dll代码报错,那里的符号重定义了,求指导(2)

www.myexceptions.net  网友分享于:2014-08-12  浏览:0次

}

else if (dwReason == DLL_PROCESS_DETACH)

{

}

return TRUE;

}

#endif

#ifdef __cplusplus

extern "C" {

#endif

static int mclDefaultPrintHandler(const char *s)

{

return mclWrite(1 /* stdout */, s, sizeof(char)*strlen(s));

}

#ifdef __cplusplus

} /* End extern "C" block */

#endif

#ifdef __cplusplus

extern "C" {

#endif

static int mclDefaultErrorHandler(const char *s)

{

int written = 0;

size_t len = 0;

len = strlen(s);

written = mclWrite(2 /* stderr */, s, sizeof(char)*len);

if (len > 0 && s[ len-1 ] != '\n')

written += mclWrite(2 /* stderr */, "\n", sizeof(char));

return written;

}

#ifdef __cplusplus

} /* End extern "C" block */

#endif

/* This symbol is defined in shared libraries. Define it here

* (to nothing) in case this isn't a shared library.

*/

#ifndef LIB_Myfitline_C_API

#define LIB_Myfitline_C_API /* No special import/export declaration */

#endif

LIB_Myfitline_C_API

bool MW_CALL_CONV MyfitlineInitializeWithHandlers(

mclOutputHandlerFcn error_handler,

mclOutputHandlerFcn print_handler)

{

int bResult = 0;

if (_mcr_inst != NULL)

return true;

if (!mclmcrInitialize())

return false;

if (!GetModuleFileName(GetModuleHandle("Myfitline"), path_to_dll, _MAX_PATH))

return false;

{

mclCtfStream ctfStream =

mclGetEmbeddedCtfStream(path_to_dll,

84706);

if (ctfStream) {

bResult = mclInitializeComponentInstanceEmbedded(   &_mcr_inst,

error_handler,

print_handler,

ctfStream,

84706);

mclDestroyStream(ctfStream);

} else {

bResult = 0;

}

}

if (!bResult)

return false;

return true;

}

LIB_Myfitline_C_API

bool MW_CALL_CONV MyfitlineInitialize(void)

{

return MyfitlineInitializeWithHandlers(mclDefaultErrorHandler, mclDefaultPrintHandler);

}

LIB_Myfitline_C_API

void MW_CALL_CONV MyfitlineTerminate(void)

{

if (_mcr_inst != NULL)

mclTerminateInstance(&_mcr_inst);

}

LIB_Myfitline_C_API

long MW_CALL_CONV MyfitlineGetMcrID()

{

return mclGetID(_mcr_inst);

}

LIB_Myfitline_C_API

void MW_CALL_CONV MyfitlinePrintStackTrace(void)

文章评论

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值