한 시간 동안 이것을 알아 내려고 노력했습니다. 내가 가지고있는 것은 Qt Creator에서 열리는 간단한 Qt 프로젝트입니다. 내가하고 싶은 것은 Qt 프로젝트에서 SDL 라이브러리 (dll)를 사용하는 것이다.Qt 프로젝트에서 제 3 자 dll/라이브러리를 참조하는 방법
Visual Studio에서 내가하는 것은 VS 도구를 사용하여이 DLL에 대한 참조를 추가하는 것입니다. Qt는 크리에이터, 나는 내 프로젝트에 대한 .pro
파일을 열, 그리고 내 사용을위한 Qt는의 라이브러리를 포함하지 않는 것 STD의 DLL 그러나
# 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
위한 LIB 항목을 추가했다. 컴파일 할 때 나는 여전히 SDL.h: No such file or directory
오류 메시지를받습니다. 내 개발 작업을 위해 Qt를 사용하는 경향이 더 커지므로이 문제를 파악하고 미래에 대해 배우는 데 도움이 될 것입니다.
LIBS += -LC:\\Users\\vata\\Desktop\\DskProj\\Dsk-build-desktop\\debug -lsdl
그냥 그 테스트가 작동하지 않았다. – Kobojunkie
@ Kobojunkie : 시도'LIBS + = "C : /Users/vata/Desktop/DskProj/Dsk-build-desktop/debug/SDL.dll" –
그 중 하나가 작동하지 않았다. – Kobojunkie