how can i include a header file in slcovmex

조회 수: 8 (최근 30일)
종한 김
종한 김 2022년 3월 3일
답변: Pat Canny 2022년 3월 3일
I have three files and i want to compile these files using slcovmex option
  1. timestwo.c (c-mex file format)
  2. task_demo\task_demo.c
  3. task_demo_HDR\task_demo.h
here is my code.
-----------------------------------------------------------------------------------------------------------------------------------------
< My Code> "make_mex.m"
clc;
clear all;
ipath = ['-I' 'C:\SILS_ALL\Test_Coverage\Coverage_Demo_file\task_demo_header'];
slcovmex({'-c','timestwo.c'},{'-c','task_demo.c'},{ipath, 'timestwo.obj','task_demo.obj', '-output','timestwo'});
----------------------------------------------------------------------------------------------------------------------------------------------
< error >
"timestwo.c", line 5: error: cannot open source file "task_demo.h"
| #include "task_demo.h"
| ^
"task_demo.c", line 2: error: cannot open source file "task_demo.h"
| #include "task_demo.h"
| ^
----------------------------------------------------------------------------------------------------------------------------------------------
is there any way to include header file path ???

채택된 답변

Pat Canny
Pat Canny 2022년 3월 3일
Hi,
Try providing the -I<path> to each individual command, like so:
slcovmex({'-c','timestwo.c', ipath},{'-c','task_demo.c', ipath},{'timestwo.obj','task_demo.obj', '-output','timestwo'});

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by