Error : undefined reference to 'engOpen'

。_饼干妹妹 提交于 2019-12-12 02:49:26

问题


Please, I'm looking for a solution to this problem erreur : undefined reference to 'engOpen' when I try to call mtlb function for c++

I'm working on win64 with QT creator.

Here is my .pro file:

TEMPLATE = app

QT += qml quick
CONFIG += c++11

SOURCES += main.cpp

RESOURCES += qml.qrc

INCLUDEPATH += "C:\Program Files\MATLAB\R2012a\extern\include"
LIBS += -L "C:\Program Files\MATLAB\R2012a\bin\win64"

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =

# Default rules for deployment.
include(deployment.pri)

回答1:


LIBS += -L "C:\Program Files\MATLAB\R2012a\bin\win64"

You're only setting the lib path, you also have to point to the lib file:

LIBS += -L<path> -l<file without extension>

On Windows you can also just set the full path (with file), but the above format should work both with Unix and Windows. In your .pro you're mixing the Unix format and the Windows format.

Cf the Qt documentation.



来源:https://stackoverflow.com/questions/35533749/error-undefined-reference-to-engopen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!