How to set define a header files directory for the MinGw64 compiler
조회 수: 10 (최근 30일)
이전 댓글 표시
I have the following problem when compiling C++ code with mex:
As my source code was developed for another platform, the use of the header files is declared with something like: "#include "emb_syst/controller/functions/control_1.hpp"
In order to be able to comile i have to change every single file and define the complete route in my harddrive with something like this: "#include "c:\source_files\emb_syst\controller\functions\control_1.hpp"
This is very annoying since i have to change all the files. Is there a way to tell the compiler on which directory all the header files are (in my case the compiler should search for the header files recursevely in the directory: "c:\source_files\"
댓글 수: 0
답변 (1개)
Abhi Sundararaman
2017년 10월 12일
Rather than changing the C++ code to have the path to the header, you can call "mex" with the "-Ipathname" flag to specify the path to the include directory files. An example of this can be found in the documentation below:
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!