错误:未定义对“engOpen"的引用 [英] Error : undefined reference to 'engOpen'

查看:49
本文介绍了错误:未定义对“engOpen"的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

拜托,我正在寻找解决此问题的方法erreur : undefined reference to 'engOpen' 当我尝试为 c++ 调用 mtlb 函数时

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

我正在使用 QT creator 开发 win64.

I'm working on win64 with QT creator.

这是我的 .pro 文件:

Here is my .pro file:

TEMPLATE = app

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

SOURCES += main.cpp

RESOURCES += qml.qrc

INCLUDEPATH += "C:Program FilesMATLABR2012aexterninclude"
LIBS += -L "C:Program FilesMATLABR2012ainwin64"

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

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

推荐答案

LIBS += -L "C:Program FilesMATLABR2012ainwin64"

你只是设置了lib路径,你还必须指向lib文件:

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

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

在 Windows 上,您也可以只设置完整路径(带文件),但上述格式应该适用于 Unix 和 Windows.在您的 .pro 文件中,您混合了 Unix 格式和 Windows 格式.

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.

参见 Qt 文档.

这篇关于错误:未定义对“engOpen"的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆