Compiler cannot find "tmwtypes.h"

[EDIT: Thu May 12 22:23:56 UTC 2011 Duplicate Removed - MKF]
I tried to deploy a MATLAB shared library on a Linux computer. When I compiled my C code on the linux computer, I got this strange error.
/opt/MATLAB/MATLAB_Compiler_Runtime/v714/extern/include/matrix.h(293): catastrophic error: could not open source file "tmwtypes.h" #include tmwtypes.h ^
maxtrix.h and tmwtypes.h are in the same folder. I am using x86-64 with suse linux
Does anyone know what the problem this is?
Thanks.

댓글 수: 2

Kaustubha Govind
Kaustubha Govind 2011년 5월 4일
What is the exact compiler command that you use? Also, have you tried the documentation example (http://www.mathworks.com/help/toolbox/compiler/f2-972343.html#f2-995584). Are you able to compile this as expected?
Kaustubha Govind
Kaustubha Govind 2011년 5월 4일
Also, please delete the duplicate question you posted at http://www.mathworks.com/matlabcentral/answers/6718-compiler-cannot-find-tmwtypes-h

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

 채택된 답변

Martijn
Martijn 2011년 5월 12일

3 개 추천

Note that matrix.h has the following include line:
#include <tmwtypes.h>
So that is with <> brackets and not "" double quotes, or in other words the compiler will look for the file in your include directories and not in the same/current directory. To resolve this add the extern/include directory to your include path, for example by using the -I (capital i) switch in your call to gcc/g++.

추가 답변 (1개)

Jason Ross
Jason Ross 2011년 5월 3일

0 개 추천

These are header files, so they should be just text. Can you open them in a text editor? If you can't, check the permissions on the files. Also, check ownership if you are performing this operation under a different user context.
After that, check your environment and make sure that directory can be found during compilation.

댓글 수: 2

Kenong
Kenong 2011년 5월 3일
The compiler can find "matrix.h" which is in the same folder as "tmwtypes.h". The folder can be found during compilation. I can open tmwtypes.h with an editor. There is no permission issue.
Jason Ross
Jason Ross 2011년 5월 4일
Are the ls -l outputs the same?
Any differences in capitalization?
Otherwise, Kaustubha's questions are very valid.

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

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

질문:

2011년 5월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by