Borrar filtros
Borrar filtros

Problems linking Matlab libraries into Qt (Linux) .. libeng.so: undefined reference to ..

5 visualizaciones (últimos 30 días)
Hey I want to create a program that has a user interface for inputs and outputs that is created using Qt c++ IDE and back functions that are programmed using matlab. To do that im using MATLAB Engine library in GUI code, but im having problems to link the Matlab libraries. My code of the .pro file is:
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.c
include(deployment.pri)
qtcAddDeployment()
INCLUDEPATH += $$PWD/../../../MATLAB/R2016a/extern/include
INCLUDEPATH += $$PWD/../../../MATLAB/R2016a/bin/glnxa64
DEPENDPATH += $$PWD/../../../MATLAB/R2016a/bin/glnxa64
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../MATLAB/R2016a/bin/glnxa64/release/
-lmex
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../MATLAB/R2016a/bin/glnxa64
/debug/ -lmex
else:unix: LIBS += -L$$PWD/../../../MATLAB/R2016a/bin/glnxa64/ -lmex
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../MATLAB/R2016a/bin/glnxa64/release/
-leng
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../MATLAB/R2016a/bin/glnxa64
/debug/ -leng
else:unix: LIBS += -L$$PWD/../../../MATLAB/R2016a/bin/glnxa64/ -leng
The compile output is as follows:
14:50:27: Running steps for project untitled...
14:50:27: Configuration unchanged, skipping qmake step.
14:50:27: Starting: "/usr/bin/make"
g++ -Wl,-rpath,/home/tecnobit/Qt5.5.0/5.5/gcc_64 -o untitled main.o -L/home/user/desktop/untitled
/../../../MATLAB/R2016a/bin/glnxa64/ -lmex -leng
/usr/bin/ld: warning: libut.so, needed by /home/user/desktop/untitled/../../../MATLAB/R2016a
/bin/glnxa64//libeng.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libmx.so, needed by /home/user/desktop/untitled/../../../MATLAB/R2016a
/bin/glnxa64//libeng.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libmat.so, needed by /home/user/desktop/untitled/../../../MATLAB/R2016a
/bin/glnxa64//libeng.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_system.so.1.56.0, needed by /home/user/desktop/untitled/../../../MATLAB
/R2016a/bin/glnxa64//libeng.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libmwcpp11compat.so, needed by /home/user/desktop/untitled/../../../MATLAB
/R2016a/bin/glnxa64//libeng.so, not found (try using -rpath or -rpath-link)
/home/user/desktop/untitled/../../../MATLAB/R2016a/bin/glnxa64//libeng.so: undefined reference to
`utF2cstr'
/home/user/desktop/untitled/../../../MATLAB/R2016a/bin/glnxa64//libeng.so: undefined reference to
`utFree'
/home/user/desktop/untitled/../../../MATLAB/R2016a/bin/glnxa64//libeng.so: undefined reference to
`matClose'
/home/user/desktop/untitled/../../../MATLAB/R2016a/bin/glnxa64//libeng.so: undefined reference to
`matPutNextVariable'
/home/user/desktop/untitled/../../../MATLAB/R2016a/bin/glnxa64//libeng.so: undefined reference to
`matCreateMATFile'
/home/user/desktop/untitled/../../../MATLAB/R2016a/bin/glnxa64//libeng.so: undefined reference to
`matrix::detail::noninlined::mx_array_api::mxDestroyArray(mxArray_tag*)'
/home/user/desktop/untitled/../../../MATLAB/R2016a/bin/glnxa64//libeng.so: undefined reference to
`matGetNextVariable'
/home/user/desktop/untitled/../../../MATLAB/R2016a/bin/glnxa64//libeng.so: undefined reference to
`utCalloc'
collect2: error: ld returned 1 exit status
make: *** [untitled] Error 1
14:50:27: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project untitled (kit: Desktop Qt 5.5.0 GCC 64bit)
When executing step "Make"
14:50:27: Elapsed time: 00:00.
Everything that i found in google couldn't help, can somebody help me i've got really no idea what to do...

Respuestas (0)

Categorías

Más información sobre App Building en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by