Note that there are some explanatory texts on larger screens.

plurals
  1. POCalling a c++ .exe from Matlab - Program Stopped Working?
    text
    copied!<p>I wrote a code in C++ called FaceTracker.cpp and other code in Matlab that do some analyzes and statics.</p> <p>What I need to do is adding a button in matlab that calls the FaceTracker when being pressed. I tried to use the following command: </p> <pre><code> system (['FaceTracker.exe &lt;' nameOfVideo]); </code></pre> <p>but it doesn't work. It opens the FaceTracker.exe GUI, then it stops ! (Like when internet explorer or any other program does sometimes\hang) with the msg "FaceTracker.exe stoped working.</p> <p>When I tried to run the .exe from command prompt it showed me the following error:</p> <pre><code> Assertion Faile: Type == IO::TRACKER ... Debug error! R6010 - abort() has been called. </code></pre> <hr> <p>From what i understd from the answers\ other sites is that I need to statically link libraries. I read in one site that I need to make the following changes:</p> <pre><code> The CRT: • Configuration Properties -&gt; C/C++ -&gt; Code Generation: Where it reads Runtime Library, change to Multi-Threaded (/MT). The manifest must go: • Configuration Properties -&gt; Manifest Tool -&gt; Input and Output: Where it reads Embed Manifest, change to No. </code></pre> <p>But when I do it (Change to /MT) I start getting the following errors:</p> <pre><code>1&gt; Generating Code... 1&gt;LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library 1&gt;libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW 1&gt;Tracker.obj : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: void __thiscall FACETRACKER::Tracker::Load(char const *)" (?Load@Tracker@FACETRACKER@@QAEXPBD@Z) 1&gt;libcpmtd.lib(stdthrow.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW 1&gt;libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW 1&gt;libcpmtd.lib(cin.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW 1&gt;IO.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1&gt;Patch.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1&gt;PAW.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1&gt;PDM.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1&gt;CLM.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1&gt;FaceTracker.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1&gt;FCheck.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1&gt;FDet.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1&gt;libcpmtd.lib(cin.obj) : error LNK2001: unresolved external symbol __free_dbg 1&gt;libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __free_dbg 1&gt;Tracker.obj : error LNK2001: unresolved external symbol __free_dbg 1&gt;libcpmtd.lib(xdebug.obj) : error LNK2001: unresolved external symbol __free_dbg 1&gt;libcpmtd.lib(locale0.obj) : error LNK2001: unresolved external symbol __free_dbg 1&gt;libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol __free_dbg 1&gt;IO.obj : error LNK2001: unresolved external symbol __free_dbg 1&gt;Patch.obj : error LNK2001: unresolved external symbol __free_dbg 1&gt;PAW.obj : error LNK2001: unresolved external symbol __free_dbg 1&gt;PDM.obj : error LNK2001: unresolved external symbol __free_dbg 1&gt;CLM.obj : error LNK2019: unresolved external symbol __free_dbg referenced in function "private: void __thiscall std::_Yarn&lt;char&gt;::_Tidy(void)" (?_Tidy@?$_Yarn@D@std@@AAEXXZ) 1&gt;FaceTracker.obj : error LNK2001: unresolved external symbol __free_dbg 1&gt;FCheck.obj : error LNK2001: unresolved external symbol __free_dbg 1&gt;FDet.obj : error LNK2001: unresolved external symbol __free_dbg 1&gt;libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &amp;,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z) 1&gt;libcpmtd.lib(locale0.obj) : error LNK2001: unresolved external symbol __malloc_dbg 1&gt;libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __malloc_dbg 1&gt;libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol __calloc_dbg referenced in function __Getctype 1&gt;C:\Users\wew\Documents\Jam3a\PROJECT-2012!!\FindSymetryInFaces\FaceTracker\Debug\FaceTracker.exe : fatal error LNK1120: 4 unresolved externals </code></pre> <p>Any Suggestions? What do I Have to do in order to be able to use the FaceTracker.exe in every computer, also the ones that doesn't have c++\vs compiler?</p> <p>besides, why does my program OPENS when I call it from matlab but then Hangs\stops working? Thank in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload