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

问题描述

请,我正在寻找解决此问题的方法
erreur:当我尝试为C ++调用mtlb函数时,对'engOpen'的未定义引用 / p>

我正在与QT创建者一起使用win64。



这是我的.pro文件:

  TEMPLATE = app 

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

资源+ = main.cpp

资源+ = qml.qrc

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

#用于解析的其他导入路径Qt Creator的代码模型
中的QML模块QML_IMPORT_PATH =

#部署的默认规则。
include(deployment.pri)


解决方案
  LIBS + = -L C:\Program Files\MATLAB\R2012a\bin\win64 

您只需设置lib路径,还必须指向lib文件:

  LIBS + = -L< path> -l<没有扩展名的文件> 

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



参考Qt 。


Please, I'm looking for a solution to this problemerreur : 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)
解决方案
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.

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

08-06 04:44