Building a mat file with a QT application
Mostrar comentarios más antiguos
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
Respuestas (2)
Walter Roberson
el 3 de Mzo. de 2011
0 votos
.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 comentario
Alex
el 3 de Mzo. de 2011
Kaustubha Govind
el 3 de Mzo. de 2011
0 votos
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 comentario
Zeljko
el 6 de Oct. de 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.
Categorías
Más información sobre C Shared Library Integration en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!