Database toolbox is not included in compiled standalone

6 views (last 30 days)
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 Comment
Lewis
Lewis on 23 Jul 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.

Sign in to comment.

Accepted Answer

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

Sign in to comment.

More Answers (2)

Akshay
Akshay on 22 Jul 2014
Edited: Akshay on 30 Jul 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 Comment
Greg
Greg on 23 Jul 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.

Sign in to comment.


Siamak Mohebbi
Siamak Mohebbi on 9 Aug 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