This question is closed. Reopen it to edit or answer.
Stand alone excutables runs ok in the directory it was mcced but not in another directory
1 view (last 30 days)
I am trying to build an standalone exe from a very simple function. I had problems with the paths before so I included the called functions in the main function. Then mcc -mv myfunction.m. the myfunction.exe runs fine when in the same directory it was created. However, it does not work properly when copied to and run from another dirfectory of the same computer. It seems that it fails to call the function (included in myfunction.m) which returns a structure. So when the trying to reference to the field of the returned structire it gives an error and quits. It does not make much sense - sucha simple task. I wonder what is wrong. By the way I am using R2012b.
Thanks and cheers, Tianyou
Walter Roberson on 2 Apr 2013
How are you referencing the called function? If you name it in a string only, then use
to force it to be included
For example, if you had
to your routine.