CPM toolbox try to compile mex maxSparseMEX.c => get error of Could Not Find C:\Program Files\MATL​AB\...\max​SparseMEX.​lib or C:\Program Files\MATL​AB\...\max​SparseMEX.​exp

I'm trying to install and use the matlab continuous profile model toolbox (CPM toolbox) provided by Jennifer Listgarten at University of Toronto at http://www.cs.toronto.edu/~jenn/CPM/ for ms alignment. I'm currently running into problems trying to get the maxSparseMEX.c file to compile using:
mex maxSparseMEX.c
and get the errors:
Could not find C:\Program Files\MATLAB\...\maxSparseMEX.lib
Could not find C:\Program Files\MATLAB\...\maxSparseMEX.exp
Does anybody know how to get around this or how to create these files in order to compile the code? Or has anybody installed this?
Thanks!

Answers (1)

To ensure that this is not a problem with MEX, please try:
>> cd C:\work
>> copyfile([matlabroot '\extern\examples\refbook\timestwo.c'])
>> mex -v timestwo.c
Does the compilation finish successfully? Please paste the complete output of the MEX command if there is a failure.

2 Comments

I tried what you suggested and the MEX command does work and there are no errors.
I then tried using your commands to compile my file, substituting the correct file path for maxSparseMEX.c:
>> copyfile([matlabroot '\toolbox\CPM_code_v1.0\cpm_functions\MEX\maxSparseMex.c'])
>> mex -v maxSparseMEX.c
and the compile worked.
I think what may have happened was that I had the maxSparseMEX.c in the MATLAB program files, which I don't have permission to access/compile into? Therefore, it couldn't write the necessary files, giving me the errors? When I used the copy function, as suggested by Kaustubha Govind, it moved my file to my current working directory where it had permission and was able to compile the file.
Thank you!!
Great! Yes, permissions does seem to have been the issue.

Sign in to comment.

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products

Asked:

on 28 Mar 2011

Community Treasure Hunt

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

Start Hunting!