Problem with legacy_code compilation and preprocessor directives
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello, Sorry if this has already been addressed, but I've been searching for quite a while and did not find the answer. I have a problem with legacy_code compiler options. I want to set a preprocessor definition e.g. "VALUE" equal to a name of a header file e.g. "header.h". VALUE is used in preprocessor directives in a cpp file:
#ifdef VALUE
#include VALUE
The following syntax works on a Mac with MATLAB r2013a and a gcc compiler:
legacy_code('compile', my_sfun, '-DVALUE=\\\"header.h\\\"');
However, on win7 x64 with MATLAB r2012b and an SDK 7.1 compiler the following error is printed:
fatal error C1083: Cannot open include file: '': No such file or directory
Here is a list of modifications I tried and what error they produced:
'-DVALUE=\"header.h\"'
fatal error C1083: Cannot open include file: '': No such file or directory
'-DVALUE="header.h"'
fatal error C1083: Cannot open include file: '': No such file or directory
'-DVALUE=\<header.h\>'
The filename, directory name, or volume label syntax is incorrect.
'-DVALUE=<header.h>'
The filename, directory name, or volume label syntax is incorrect.
'-DVALUE=header.h'
fatal error C1083: Cannot open include file: '': No such file or directory
Anybody that can help me with this, please?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Troubleshooting in MATLAB Compiler SDK에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!