Database toolbox is not included in compiled standalone

3 vues (au cours des 30 derniers jours)
Greg le 22 Juil 2014
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 commentaire
Lewis le 23 Juil 2014
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.

Connectez-vous pour commenter.

Réponse acceptée

Friedrich le 23 Juil 2014
sounds like you both run into this. Apply the patch and try again.
  4 commentaires
Greg le 23 Juil 2014
Actually looks like this did resolve our issue. After a reboot and recompile it works as expected.
Thanks for the assistance.

Connectez-vous pour commenter.

Plus de réponses (2)

Akshay le 22 Juil 2014
Modifié(e) : Akshay le 30 Juil 2014
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.
  1 commentaire
Greg le 23 Juil 2014
I am not sure what a network license is for the database toolbox, but I am pretty sure I am using a local version. I have all of the .m files in the toolbox directory in matlabroot. I have separately tried to connect to the database by running the code through matlab and everything works as expected.

Connectez-vous pour commenter.

Siamak Mohebbi
Siamak Mohebbi le 9 Août 2019
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.


Community Treasure Hunt

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

Start Hunting!

Translated by