MATLAB compiling problem/error
古いコメントを表示
I am encountering a problem trying to MATLAB compile a stimuli presentation program. When I try to compile it I encounter an error:
The file 'C:\Program Files (x86)\MATLAB\toolbox\Psychtoolbox\PsychHardware\BrightSideDisplay\BrightSideCore.mexw32' appears to be a MEX-file. It shadows the M-file 'C:\Program Files (x86)\MATLAB\toolbox\Psychtoolbox\PsychHardware\BrightSideDisplay\BrightSideCore.m' but will not execute properly at runtime, as it does not export a function named 'mexFunction.'
I have tried compiling it on 2 different desktops and a laptop (running on MATLAB 2009b and PTB-3 in Windows 7) but I still get the same problem.
I have looked extensively on forums and online and have tried some workarounds suggested. I have done the following but the problem still remains: 1) One suggestion was to delete the 'mexw32' file (section 4.3.4 of http://docs.mosek.com/6.0/toolbox/node006.html#227582464 ). While doing this allowed me to compile the code into a standalone exe, the executable crashes when I run it. 2) I did a search on MATLAB/PTB documentation for 'BrightSide' (<http://docs.psychtoolbox.org/BrightSideDisplay>) and found the following documentation (<http://docs.psychtoolbox.org/BSRuntimeLibs>) that instruct me to install library files from a company called BrightSide Technologies (MATLAB and Psychtoolbox cannot provide the files due to licencing issues). However, while I could locate most of these files online and from the computer, the first 2 files cannot be located (GL_OutputLibrary.dll and CoreLibrary_GL.dll). Upon further research I have come to the conclusion that Bright Side Technologies has since been overtaken by Dolby, so the files do not exist anymore.
Any help is appreciated!
1 件のコメント
Walter Roberson
2013 年 1 月 15 日
回答 (2 件)
Kaustubha Govind
2013 年 1 月 15 日
0 投票
I'm not sure if I can be of much help, but just some thoughts that might help you understand what might be going on:
- It is pretty to common to have a MEX-file (.mexw32 on Win32) and a MATLAB-file (.m) with the same name. The actual algorithm is usually in the MEX-file, but the M-file only exists to provide help. (see http://stackoverflow.com/questions/532430/how-to-add-help-text-to-a-mex-function) But essentially, you absolutely need the MEX-file for your application.
- There is a problem with the MEX-function that you have. Namely, "it does not export a function named 'mexFunction'".
The only way to fix this is to possibly re-compile the MEX-file (or to obtain the correct one from the vendor).
I just encountered the same issue with my own mex file. I am adding it to a MCC build for another project that I am working on. As Kaustubha noted above, there is an identically named m-file to the mex file which contains help information for what is inside the mex. Once I moved away the m-file everything compiled fine.
I know it is a year later but this may help others: Move the BrightSideCore.m file away and it should build. My guess is that the BrightSideCore.m file contains help info for what is going on in the associated mex file.
EDIT: It is still not clear to me, however, why the mex validation fails when there clearly is a valid 'mexFunction' in the mex file.
カテゴリ
ヘルプ センター および File Exchange で Installation and Operational Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!