找回密码
 注册
关于网站域名变更的通知
查看: 830|回复: 1
打印 上一主题 下一主题

matlab和C++混编的程序怎样运行呢? ??

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2019-7-16 15:03 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x
5 J0 c- |% N1 G2 ~7 [# O$ F
; u% e7 J1 D2 A. Y" W$ y% B' R8 B

/ e' Q) }. Q) x. e" @$ U+ c

这是readme文件中的说明:

Please follow these simple instructions to get the
1 r% ]8 G$ z/ QToolBox working:

1) Download and unzip SegToolBox.zip from the website.

****** PRECAUTION: Please make sure that the path-name to the directory where files are unzipped does NOT contain any spaces. ******

2) Open Matlab. Cd to the unzipped directory whcih has all the files.

3) Make sure you have mex C++ compiler installed (Ex: Visual C++.)

  • To choose the compiler type "mex -setup" at the matlab commandline.
  • Follow the instructions therein until you have chosen a C++ compiler.$ m# T2 q! X: |6 v: K4 P0 F3 f- {

4) Build the library files required by the toolbox by executing
9 b8 W; x% Y- I. g4 sthe following at the matlab commandline:

mex GraphCutSegment.cpp graph.cpp maxflow.cpp( M5 _. `) |( d  _" g0 f) l; m

9 P3 l, J+ o% R8 M+ {7 N/ `AND. I9 v& ~/ T, g5 G9 x/ J/ P- Z' ]
mex GraphCutSegmentLazy.cpp graph.cpp maxflow.cpp

This should create the library files (ex: FileName.dll in Windows or
) O9 k) m* z- W8 q7 kFileName.mexmac in MacOS)

我按上面操作生成了一个GraphCutSegmentLazy.mexw64文件 另一个生成失败了 但是按照readme说明不是应该生成.dll文件吗?这个列表里本来就有,这个mexw64是来运行程序的吗?


) z0 d& p4 l0 o" `2 m" j9 ]$ p4 S% |

; _; H, _; t5 ?2 w, [* D  u0 h+ ]
; X+ y" Q6 \" A, h
  • TA的每日心情

    2019-11-19 15:34
  • 签到天数: 1 天

    [LV.1]初来乍到

    2#
    发表于 2019-7-16 18:15 | 只看该作者

    Matlab调用C/C++的方式主要有两种:利用MEX技术和调用C/C++动态连接库。

      在Matlab与C/C++混合编程之前,必须先对Matlab的编译应用程序mex和编译器mbuild进行正确的设置[1]:

      对Matlab编译应用程序mex的设置:Mex –setup.

      对Matlab编译器mbuild的设置:Mbuild –setup.


    . S  L0 |5 e! S5 d
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    关闭

    推荐内容上一条 /1 下一条

    EDA365公众号

    关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

    GMT+8, 2025-7-18 21:20 , Processed in 0.125000 second(s), 26 queries , Gzip On.

    深圳市墨知创新科技有限公司

    地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

    快速回复 返回顶部 返回列表