Database toolbox is not included in compiled standalone

조회 수: 5 (최근 30일)
Greg
Greg 2014년 7월 22일
답변: Siamak Mohebbi 2019년 8월 9일
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
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Friedrich
Friedrich 2014년 7월 23일
Hi,
sounds like you both run into this. Apply the patch and try again.
  댓글 수: 4
Lewis
Lewis 2014년 7월 23일
Awesome, that worked :) Thanks Friedrich.
Greg
Greg 2014년 7월 23일
Actually looks like this did resolve our issue. After a reboot and recompile it works as expected.
Thanks for the assistance.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Akshay
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.
  댓글 수: 1
Greg
Greg 2014년 7월 23일
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.

댓글을 달려면 로그인하십시오.


Siamak Mohebbi
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.

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by