Why are functions called by “eval” not found by my compiled standalone application?
I have a function "databaseConnectWithEval" that is defined as follows:
function conn = databaseConnectWithEval
conn = eval(‘database("MySQL ODBC","username","password");’);
end
If I call this function from the MATLAB Command Window, it works as expected.
However, if I compile this function into a standalone application, and then run the executable, the following error is thrown:
Undefined function ‘database’ for input arguments of type ‘char’.
If I use the following function, without "eval", then both the function and the compiled executable work as expected.
function conn = databaseConnect
conn = database("MySQL ODBC","username","password");
end
Why is this function inside of "eval" not found by my compiled application?I have a function "databaseConnectWithEval" that is defined as follows:
function conn = databaseConnectWithEval
conn = eval(‘database("MySQL ODBC","username","password");’);
end
If I call this function from the MATLAB Command Window, it works as expected.
However, if I compile this function into a standalone application, and then run the executable, the following error is thrown:
Undefined function ‘database’ for input arguments of type ‘char’.
If I use the following function, without "eval", then both the function and the compiled executable work as expected.
function conn = databaseConnect
conn = database("MySQL ODBC","username","password");
end
Why is this function inside of "eval" not found by my compiled application? I have a function "databaseConnectWithEval" that is defined as follows:
function conn = databaseConnectWithEval
conn = eval(‘database("MySQL ODBC","username","password");’);
end
If I call this function from the MATLAB Command Window, it works as expected.
However, if I compile this function into a standalone application, and then run the executable, the following error is thrown:
Undefined function ‘database’ for input arguments of type ‘char’.
If I use the following function, without "eval", then both the function and the compiled executable work as expected.
function conn = databaseConnect
conn = database("MySQL ODBC","username","password");
end
Why is this function inside of "eval" not found by my compiled application? eval, compiler MATLAB Answers — New Questions