Matlab (2011b) compiler doesn't compile

조회 수: 8 (최근 30일)
Sara Iliafar
Sara Iliafar 2012년 2월 13일
편집: Cedric 2013년 10월 10일
Hi there,
It seems that the 2011b version of matlab has some bug with its matlab compiler. I tried compiling with the 2011b version and it gives me this warning: Warning: an error occurred while parsing class emlcoder.InferenceReport: Undefined function 'findclass' for input arguments of type 'double'. +
After waiting for another while, it gives another warning: Warning: an error occurred while parsing class RTW.TflViewer: Undefined function 'findclass' for input arguments of type 'double'.
and it never compiles. I can compile on a computer with the 2009b version but then it doesnt execute on computers that have the 2011b version. =/
Also, from searching online, it seems that I might have to manually specify the path but I am not totally sure which toolbox I am using
I was wondering if you had any suggestions.
Thank you.

답변 (5개)

Andreas Goser
Andreas Goser 2012년 2월 13일
The most frequent issue is that users do not have a supported compiler with their Windows 64 bit installation. Please verify:
  댓글 수: 1
Sara Iliafar
Sara Iliafar 2012년 2월 13일
Hi Andreas,
Thank you for your respond.
I re-installed Microsoft Visual C++ 2010 Express with Microsoft Windows SDK 7.1, and used "mbuild -set up" to tell matlab to use the compiler. Matlab could find the compiler without any problems but I am still getting the same warning message as before and the compiler still cannot compile. :(

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


Kaustubha Govind
Kaustubha Govind 2012년 2월 13일
You may have already read that I recommended using the "-N -p" option to specify the paths. If you are using a small number of toolbox functions, you can run "which functionname" to find out the path to the toolbox.
Also, please consider reporting this to MathWorks Tech Support.
  댓글 수: 2
Sara Iliafar
Sara Iliafar 2012년 2월 13일
Hi Kaustubha,
Thank you for your reply.
I was able to find the toolbox path but the compiler still cannot compile despite using the -N -p option.
Sara
Kaustubha Govind
Kaustubha Govind 2012년 2월 14일
Sara: Is it still the same error?

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


David
David 2012년 9월 1일
Hi All,
I simply wanted to share that I am witnessing the exact same error flow as described by the OP. If anyone has found a solution, I would be appreciative if you might take the time to share. Thank you for detailing the problem so precisely, and for the two solutions attempts previously offered.
Regards, David

Matthijs
Matthijs 2012년 10월 26일
편집: Matthijs 2012년 10월 26일
I experienced the same issue with R2012a, after having successfully compiled the same code on R2010b. Since it's just a warning I ran the compiled executable anyway, but it failed with an "ApplicationRedefinedException". Here's how I fixed the problem (not claiming that this solution works for everyone).
My code makes use of MEX-files generated with EMLMEX, so I figured it had something to do with that. I went through these steps (I'll list them all, even though some did not help to fix the issue). For the impatient, steps 5 and 6 fixed the issue.
1. Converted the scripts used to generate the MEX-files using CODER.UPGRADE
2. Using the converted scripts (that use CODEGEN instead of EMLMEX) re-compiled the MEX files. This did not solve the issue.
3. Changed my main routine to call the regular M-files instead of the MEX-files. This didn't fix the issue.
4. Searched the path for occurrences of "emlcoder". Deleted all files containing occurrences (such as backups generated by coder.upgrade), until there were no more occurrences. This didn't fix the issue.
5. One of the paths containing a MEX-file was included in the mcc command with the -a option. I changed this to the -I option (so that only files that can be determined to be needed at compile time are included). This fixed the issue.
6. However, I need this -a option for this path. I moved the scripts in this path used to generate the MEX-files (the upgraded scripts that don't make use of eml, but of coder) to another directory that is not included in mcc. This fixed the issue.
Hope this helps.

George
George 2012년 10월 29일
편집: George 2012년 11월 1일
Sara, You may need to reinstall Matlab 2011b after you have installed the Win SDK and compilers. I found that executables created using 2011a would not run on my system despite having all of the necessary components, apparently because during the build process another version of the VC++ redistributable was being specified. However, after reinstalling Matlab, everything worked.
In summary, it seems that Win SDK and its compilers must be installed prior to Matlab being installed. If you did it that way, then I do not know what the solution is, except to upgrade to 2012b.
If anyone has had success getting the Matlab compiler to work with Win SDK and compilers installed afterward, I am interested to know.

카테고리

Help CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by