Using mex: Cannot open include file: 'levmar.h': No such file or directory

I am still learning how to use the mex command and I have a file called levmar.c which has #include levmar.h
I type in the command prompt
mex levmar.c
and the following text appears
Building with 'Microsoft Visual C++ 2012 (C)'.
Error using mex
levmar.c
C:\Users\Alex\Documents\levmar-2.6\levmar-2.6\matlab\levmar.c(27)
: fatal error C1083: Cannot open include file:
'levmar.h': No such file or directory
I have levmar.h in the working directory, so I don't know why I would be getting this error unless all include files have to be in a special directory. Using the option to specify the pathname for include files I typed the following into the command prompt:
>> mex levmar.c -I<C:\Users\Alex\Documents\levmar-2.6\levmar-2.6\matlab>
And the following was the result:
Building with 'Microsoft Visual C++ 2012 (C)'.
Error using mex
Access is denied.
Does anyone know why this could be happening? Thank you in advance!

Réponses (1)

James Tursa
James Tursa le 29 Juin 2015
Modifié(e) : James Tursa le 29 Juin 2015
levmar.h needs to be in the current directory. Try copying it there.

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by