Building a mat file with a QT application
Ältere Kommentare anzeigen
I have some c++ QT code I would like to use to write data for a .mat file. I have included in the .pro (QT project file) file:
WIN32:LIBS += \
"C:/Program Files/MATLAB/R2010b/extern/lib/win64/microsoft/libeng.lib" \
"C:/Program Files/MATLAB/R2010b/extern/lib/win64/microsoft/libma.lib" \
"C:/Program Files/MATLAB/R2010b/extern/lib/win64/microsoft/libmex.lib" \
"C:/Program Files/MATLAB/R2010b/extern/lib/win64/microsoft/libmwblas.lib" \
"C:/Program Files/MATLAB/R2010b/extern/lib/win64/microsoft/libmqblascompat32.lib" \
"C:/Program Files/MATLAB/R2010b/extern/lib/win64/microsoft/libmxlapack.lib" \
"C:/Program Files/MATLAB/R2010b/extern/lib/win64/microsoft/libmwmathutil.lib" \
"C:/Program Files/MATLAB/R2010b/extern/lib/win64/microsoft/libmx.lib" \
"C:/Program Files/MATLAB/R2010b/extern/lib/win64/microsoft/libut.lib"
I have also included the header files from the examples on mat file writing in the MATLAB installation. For some reason the compiler is not able to find the mat file functions. The error messages are similar to this:
undefined reference to `matOpen'
The only thing I can think of at this point is that the .lib files are compiler specific and won't work with the QT Creator compiler?
If anyone has any suggestions or experience I would really appreciate it.
Thanks in advance
Antworten (2)
Walter Roberson
am 3 Mär. 2011
0 Stimmen
.lib files should not be compiler specific (well, not under normal circumstances), but they would be specific about whether they are 32 bit or 64 bit libraries. I believe the ones you list are 64 bit libraries (/win64 subdirectory), but your comment says WIN32 which would be for 32 bit libraries. One or more of us is confused ;-)
1 Kommentar
Alex
am 3 Mär. 2011
Kaustubha Govind
am 3 Mär. 2011
0 Stimmen
One good way to figure out if you're using all the right compiler options is to use the engmatopts.bat option file discussed here, compile with the mex -v (verbose) option to see the exact compiler/linker commands.
1 Kommentar
Zeljko
am 6 Okt. 2013
That may be useful when compiling through mex with other compilers, but we are trying to compile within a Qt environment and as far as I can tell, mex has no role there.
Kategorien
Mehr zu C Shared Library Integration finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!