Compiling a c++ code in MATLAB R2016a

4 ビュー (過去 30 日間)
Deepashree Gurumurthy
Deepashree Gurumurthy 2016 年 11 月 3 日
コメント済み: James Tursa 2016 年 11 月 3 日
I am trying to compile a C++ program on MATLAB R2016a on Windows 10. I have worked on other C files in the same version of MATLAB and OS successfully before.
I have completed the 'mex -setup' and also changed the compiler to 'Microsoft Visual C++ 2015 Professional', and changed current directory and the path to the folder which contains this file . Also, as per suggestions on related topics on MATLAB Answers , I tried using addpath() and changing environment variables to the matlabroot folder as well .
I still encounter the same error which says file not found or check spelling , as shown below.
>> mex segment.cpp
Error using mex C:\Users\...\segment.cpp not found; check that you are in the correct current folder, and check the spelling of 'C:\Users\...\segment.cpp'.
I have checked the spelling and tried exist('segment.cpp') which returned 2 , but I might be missing something very simple here .
Can anyone please help me out with this?
Thanks in advance !
  1 件のコメント
James Tursa
James Tursa 2016 年 11 月 3 日
What does this do?
dir segment.cpp

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeWrite C Functions Callable from MATLAB (MEX Files) についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by