Database toolbox is not included in compiled standalone
5 次查看(过去 30 天)
显示 更早的评论
I am running into an issue where Matlab Compiler is not adding the Database toolbox to my compiled output even if I specifically include it. The error message I get when calling the database function is:
Undefined function 'database' for input arguments of type 'char'.
The mcc command I am running has
-a "$matlabroot\toolbox\database
where $matlabroot is the full path to the install directory. When I look at the output in the ctfroot directory, I see many of the toolboxes included, but database is not one of them. I have confirmed that I have a valid license for this toolbox.
1 个评论
Lewis
2014-7-23
I am having the same issue with trying to include 'findpeaks.m' from the signal processing toolbox. It works fine when I compile a 64-bit standalone, but when I try to compile a 32-bit standalone, using 32-bit Matlab 2014a from my 64-bit machine, I get an error saying that findpeaks could not be found!
I currently have a trial license, but I don't think that this has anything to do with the issue.
Interestingly, I copied findpeaks.m from the toolbox folder and put it in the current working directory, this didn't solve the issue, but the compiler found the function. I then had the issue that it couldn't find other dependent functions, within findpeaks.m.
采纳的回答
更多回答(2 个)
Akshay
2014-7-22
编辑:Akshay
2014-7-30
Since you confirmed that you have a valid license, I am assuming you are using a network License for the toolbox. If yes, please do check out the license explicitly for database toolbox before compiling the application. MATLAB checks out the required toolbox license for 30 minutes. Hence it is a recommended that one executes MATLAB code to make sure it runs error free. Once the code runs error free, should it be deployed.
>> temp = license('checkout','Database_Toolbox')
Secondly if you have a 32 bit MATLAB (R2014a) installed on a 64 bit Windows Machine, the issue is seen quiet sporadically. Having said that, ensure 32-bit or 64-bit compatibility across your driver, database, operating system, and MATLAB
Also you can try to establish a connection with the database to be sure about the issue getting popped up during compilation.
Siamak Mohebbi
2019-8-9
Matlab's MEX compiler/wrapper allows for the resident compiler (not mcc) to compiler into a Matlab standalone database related access routine(s) (C, C++) , like ODBC. Assuming that one can resolve the type case of different variable types, it is very well possible to create a standalone Matlab routine bypassing the Matlab compiler deficiency of not supporting Matlab Database toolbox calls in their stand alone library.
Note: The resident compiler (ie. MS-C++ 5.0, 6.0, Borland Builder 5.0, 6.0, etc.) must be compatible with the version of the Matlab's MEX.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!