Solved Unable to find .h files from MATLAB in a QT Creator Project
-
Hi everyone,
I'm a certified noob when it comes to QT Creator and fairly new to C++ (I'm familiar with C and other common languages though). I found a project online that I am trying to have work that is ran through QT Creator with various C++ files. This project is trying to include header files I think that are from MATLAB after brief Googling like "matrix.h", "mex.h", and "engine.h", but QT is saying that it is unable to find the file. I am wondering if anybody knows what I'd need to do get rid of this error? So far I've tried installing MATLAB software on my computer and referencing it where need be in my project, but it hasn't gotten rid of these particular errors. If anyone could provide any assistance or help, I'd appreciate it!
-
Hi and welcome to devnet,
Do you have these headers in your Matlab installation somewhere ?
-
as @SGaist said, you must be having these header files in some directory of your system. Use INCLUDEPATH in Qt project file(.pro) file to specify where these files exist.
-
@SGaist @dheerendra Hi there and thanks for the reply!
The MATLAB installation does have the header files in it. I realized the INCLUDEPATH in the .pro file put in the path for the location of these header files and tried going to it in my terminal, only to realize a small typo needing to change /Applications/MATLAB_R2018b.app/extern/include/ to /Applications/MATLAB_R2018a.app/extern/include/. Changing that got rid of those errors. Thanks!
-
This post is deleted!