How to set define a header files directory for the MinGw64 compiler
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Abhi Sundararaman
le 12 Oct 2017
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 commentaires
Voir également
Catégories
En savoir plus sur MATLAB Support for MinGW-w64 C/C++ Compiler dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!