【发布时间】:2011-11-26 20:58:07
【问题描述】:
一个小时以来一直在尝试解决这个问题。我拥有的是一个在 Qt Creator 中打开的简单 Qt 项目。我想做的是在我的 Qt 项目中使用 SDL 库 (dll)。
在 Visual Studio 中,我通常会使用为此提供的 VS 工具添加对此 dll 的引用。在 Qt creator 中,我为我的项目打开了 .pro 文件,并为 STD dll 添加了一个 LIB 条目
# Add more folders to ship with the application, here
folder_01.source = qml/BoxGame
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01
# Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =
symbian:TARGET.UID3 = 0xEED812B5
# Smart Installer package's UID
# This UID is from the protected range and therefore the package will
# fail to install if self-signed. By default qmake uses the unprotected
# range value if unprotected UID is defined for the application and
# 0x2002CCCF value if protected UID is given to the application
#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
# Allow network access on Symbian
symbian:TARGET.CAPABILITY += NetworkServices
# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
# CONFIG += mobility
# MOBILITY +=
LIBS += C:\Users\vata\Desktop\DskProj\Dsk-build-desktop\debug\SDL.dll
# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp \
blockboxes.cpp \
block.cpp \
boxengine.cpp \
boxgame.cpp \
point.cpp \
gamecontroller.cpp \
gamecontrollermod.cpp
# Please do not modify the following two lines. Required for deployment.
include(qmlapplicationviewer/qmlapplicationviewer.pri)
qtcAddDeployment()
HEADERS += \
blockboxes.h \
block.h \
boxengine.h \
boxgame.h \
Globals.h \
point.h \
gamecontroller.h \
gamecontrollermod.h \
controller.h
但是,这似乎不包括 Qt 中的库供我使用。编译时,我仍然收到SDL.h: No such file or directory 错误消息。将不胜感激任何帮助弄清楚这一点,并可能为未来学习,因为我打算在我的开发工作中更频繁地使用 Qt。
Running build steps for project Tetris...
Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe" clean
C:/QtSDK/mingw/bin/mingw32-make -f Makefile.Debug clean
【问题讨论】:
标签: c++ qt mingw sdl qt-creator