win32:libs 未定义的引用
我想在 Qt 项目中链接 .lib,但收到有关对 vhtIOConn::getDefault(vhtIOConn::DeviceType) 的未定义引用的错误。
我已将以下规范添加到 .pro 文件中:
######################################################################
# Automatically generated by qmake (2.01a) vie 28. ago 12:48:10 2009
######################################################################
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
LIBS += "C:\agregar\VirtualHandCore.lib"
LIBS += "C:\agregar\VirtualHandDevice.lib"
LIBS += "C:\agregar\VirtualHandRegistry.lib"
# Input
HEADERS += "C:/Documents and Settings/halvarado/Mis documentos/respaldos de Qt/Development/include/vhandtk/vhtBase.h"
SOURCES += main.cpp
我应该做什么?
I want to link a .lib in my Qt project and I get an error about an undefined reference to vhtIOConn::getDefault(vhtIOConn::DeviceType)
.
I have already added the following specifications to the .pro file:
######################################################################
# Automatically generated by qmake (2.01a) vie 28. ago 12:48:10 2009
######################################################################
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
LIBS += "C:\agregar\VirtualHandCore.lib"
LIBS += "C:\agregar\VirtualHandDevice.lib"
LIBS += "C:\agregar\VirtualHandRegistry.lib"
# Input
HEADERS += "C:/Documents and Settings/halvarado/Mis documentos/respaldos de Qt/Development/include/vhandtk/vhtBase.h"
SOURCES += main.cpp
What should I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
现在无法访问电脑,但请尝试删除引号并使用斜杠而不是反斜杠作为库路径的分隔符。
Don't have access to a pc now, but try removing the quotes and using slash instead of backslash as separator for the lib paths.
就是这样
this is how
这对我有用,我目前正在 Linux 中使用 Qt 5。
我所做的是在 name_of_your_project.pro 中添加这一行,
您可以尝试一下,只需将 uiohook 更改为您要链接的库的名称即可。我希望这有帮助。
this worked for me, I'm currently working with Qt 5 in linux.
what I did was to add in the name_of_your_project.pro this line
you could try it, just change uiohook for the name of the lib you want to link. I hope this helps.