MATLAB: Undefined function or method for input arguments of type ‘double’ only after compilation

compilation errorundefined function or method for input arguments of type 'double'

[EDIT: 20110526 12:26 CDT – reformat – WDR]
Hi All,
I'm a user and the one that upgrades specific Matlab application. With a new model added to the tool new application is created and distributed. Matlab version used up to now was 2006b(compiler v7.5, Windows XP).
However after computer change (new operation system Win7, new Matlab version 2008b = new compiler required v7.9) the same computation functions after compilation are not functional any longer (they still work as single functions in Matlab main editor).
The error message is: undefined function or method for input arguments of type 'double'
The compiler gives 1 warning during compilation:
Warning: Name is nonexistent or not a directory: C:\Program Files\MATLAB\R2008b\toolbox\compiler\patch.
Patch folder was not present in Matlab 2006b version used before.
I spent already quite some time on searching for similar problems on the internet and tried a lot of suggestions but none of them is functional for me. For instance adding dummy patch folder (warning dissapears but application error remains)or changing environmental variables (Path) from 'Program Files' also(x86) forms into Progra~1 and Progra~2.
Below I put compilation output without dummy Patch folder.
Did anyone face similar problems?
Any hint would be appreciated.
Greetings
Ania
-------------------------------------------------------------------
Compiler version: 4.9 (R2008b)
mcc -o 'BWT_1v32' -W 'main' -d 'C:\Package\src' -T 'link:exe' -v -C -w 'enable:specified_file_mismatch' -w 'enable:repeated_file' -w 'enable:switch_ignored' -w 'enable:missing_lib_sentinel' -w 'enable:demo_license'
-----------------------------------------------------------
LIST OF ALL THE FILES USED DURING COMPILATION
-----------------------------------------------------------
Warning: Name is nonexistent or not a directory: C:\Program
Files\MATLAB\R2008b\toolbox\compiler\patch.
Warning: Name is nonexistent or not a directory: C:\Program
Files\MATLAB\R2008b\toolbox\compiler\patch.
Processing C:\Program Files\MATLAB\R2008b\toolbox\matlab\mcc.enc
Processing C:\BWT\Code\BWT_GuiAbout.fig
Processing C:\BWT\Code\BWT_GuiConfigBw.fig
Processing C:\BWT\Code\BWT_GuiConfigNSet.fig
Processing C:\Program Files\MATLAB\R2008b\toolbox\matlab\guide\guideopts.fig
Processing C:\Program Files\MATLAB\R2008b\toolbox\matlab\winfun\actxcontrolselect.fig
Processing C:\Program Files\MATLAB\R2008b\toolbox\matlab\winfun\actxcontrolcreateproperty.fig
Processing include files...
2 item(s) added.
Processing directories installed with MCR...
The file C:\Package\src\mccExcludedFiles.log contains a list of functions excluded from the CTF archive.
2 item(s) added.
Generating MATLAB path for the compiled application...
Created 47 path items.
Begin validation of MEX files: Thu May 26 08:41:04 2011
End validation of MEX files: Thu May 26 08:41:04 2011
Warning: Name is nonexistent or not a directory: C:\Program
Files\MATLAB\R2008b\toolbox\compiler\patch.
Deleting 0 temporary MEX authorization files.
Parsing file "C:\BWT\Code\BWT.m"
(Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2008b\toolbox\compiler\deploy\deployprint.m"
(Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2008b\toolbox\compiler\deploy\printdlg.m"
(Referenced from: "Compiler Command Line").
Generating file "C:\Package\src\BWT_1v32_main.c".
Generating file "C:\Package\src\BWT_1v32_delay_load.c".
Generating file "C:\Package\src\readme.txt".
Generating file "C:\Package\src\BWT_1v32_mcc_component_data.c".
Executing command: mbuild -O -v -output "BWT_1v32" -I"C:\Package\src" "C:\Package\src\BWT_1v32_main.c" "C:\Package\src\BWT_1v32_mcc_component_data.c" -link exe -env MCR_DELAYLOAD=/delayload:mclmcrrt79.dll -env MCR_DELAYLIB=delayimp.lib -outdir "C:\Package\src"
This is mbuild Copyright 1984-2006 The MathWorks, Inc.
-> Default options filename found in C:\Users\nlv15820\AppData\Roaming\MathWorks\MATLAB\R2008b
----------------------------------------------------------------
-> Options file = C:\Users\nlv15820\AppData\Roaming\MathWorks\MATLAB\R2008b\compopts.bat
-> COMPILER = lcc
-> Compiler flags:
COMPFLAGS = -c -Zp8 -I"C:\PROGRA~1\MATLAB\R2008b\sys\lcc\include" -noregistrylookup
OPTIMFLAGS = -DNDEBUG
DEBUGFLAGS = -g4
arguments = -IC:\PACKAGE\SRC
Name switch = -Fo
-> Pre-linking commands =
-> LINKER = lcclnk
-> Link directives:
LINKFLAGS = -tmpdir "C:\PACKAGE\SRC\." -L"C:\PROGRA~1\MATLAB\R2008b\sys\lcc\lib" -libpath "C:\PROGRA~1\MATLAB\R2008b\extern\lib\win32\lcc"
LINKFLAGSPOST = mclmcrrt.lib
Name directive = -o "C:\PACKAGE\SRC\BWT_1v32.exe"
File link directive =
Lib. link directive =
Rsp file indicator = @
-> Resource Compiler =
-> Resource Linker =
----------------------------------------------------------------
--> lcc -IC:\PACKAGE\SRC -c -Zp8 -I"C:\PROGRA~1\MATLAB\R2008b\sys\lcc\include" -noregistrylookup -FoC:\USERS\NLV15820\APPDATA\LOCAL\TEMP\MBUILD~1\BWT_1v32_main.obj -IC:\PROGRA~1\MATLAB\R2008b\extern\include -IC:\PROGRA~1\MATLAB\R2008b\simulink\include -DNDEBUG C:\PACKAGE\SRC\BWT_1v32_main.c
--> lcc -IC:\PACKAGE\SRC -c -Zp8 -I"C:\PROGRA~1\MATLAB\R2008b\sys\lcc\include" -noregistrylookup -FoC:\USERS\NLV15820\APPDATA\LOCAL\TEMP\MBUILD~1\BWT_1v32_delay_load.obj -IC:\PROGRA~1\MATLAB\R2008b\extern\include -IC:\PROGRA~1\MATLAB\R2008b\simulink\include -DNDEBUG C:\PACKAGE\SRC\BWT_1v32_delay_load.c
Warning C:\PACKAGE\SRC\BWT_1v32_delay_load.c: 21 static `void function(void) FailedToLoadMCR' is not referenced
0 errors, 1 warnings
--> lcc -IC:\PACKAGE\SRC -c -Zp8 -I"C:\PROGRA~1\MATLAB\R2008b\sys\lcc\include" -noregistrylookup -FoC:\USERS\NLV15820\APPDATA\LOCAL\TEMP\MBUILD~1\BWT_1v32_mcc_component_data.obj -IC:\PROGRA~1\MATLAB\R2008b\extern\include -IC:\PROGRA~1\MATLAB\R2008b\simulink\include -DNDEBUG C:\PACKAGE\SRC\BWT_1v32_mcc_component_data.c
Contents of C:\USERS\NLV15820\APPDATA\LOCAL\TEMP\MBUILD~1\mbuild_tmp.rsp:
C:\USERS\NLV15820\APPDATA\LOCAL\TEMP\MBUILD~1\BWT_1v32_main.obj C:\USERS\NLV15820\APPDATA\LOCAL\TEMP\MBUILD~1\BWT_1v32_delay_load.obj C:\USERS\NLV15820\APPDATA\LOCAL\TEMP\MBUILD~1\BWT_1v32_mcc_component_data.obj
--> lcclnk -o "C:\PACKAGE\SRC\BWT_1v32.exe" -tmpdir "C:\PACKAGE\SRC\." -L"C:\PROGRA~1\MATLAB\R2008b\sys\lcc\lib" -libpath "C:\PROGRA~1\MATLAB\R2008b\extern\lib\win32\lcc" @C:\USERS\NLV15820\APPDATA\LOCAL\TEMP\MBUILD~1\MBUILD~1.RSP mclmcrrt.lib
Manually moving BWT_1v32.exe to C:\PACKAGE\SRC\BWT_1v32.exe
Manually moving BWT_1v32.lib to C:\PACKAGE\SRC\BWT_1v32.lib
Manually moving BWT_1v32.exp to C:\PACKAGE\SRC\BWT_1v32.exp
--> "if exist C:\USERS\NLV15820\APPDATA\LOCAL\TEMP\MBUILD~1\templib.def del C:\USERS\NLV15820\APPDATA\LOCAL\TEMP\MBUILD~1\templib.def"
--> "if exist C:\USERS\NLV15820\APPDATA\LOCAL\TEMP\MBUILD~1\templib_stub.obj del C:\USERS\NLV15820\APPDATA\LOCAL\TEMP\MBUILD~1\templib_stub.obj"
Copying: C:\Package\src\BWT_1v32.exe -> C:\Package\distrib
Copying: C:\Package\src\BWT_1v32.ctf -> C:\Package\distrib
Copying: C:\Package\src\readme.txt -> C:\Package\distrib
Compilation completed succesfully. The output is located in C:\Package\distrib.
You can package the component by clicking on the "Package" icon in the Deployment Tool toolbar, or by clicking the Tools->Package menu when the Deployment Tool panel is selected. To include additional files in the package, click Project->Settings).

Best Answer

Hi,

first of all, the missing patch folder is a bug and can be safely ignored, see http://www.mathworks.com/support/bugreports/485872.

For the problem itself: if you start the program from some CMD file, you should get a more meaningful error message. Could you post this one?

Titus

Related Question