PDA

View Full Version : QMake generating Visual Studio 2008 project files won't run, missing QtSqld4.dll



scarleton
4th September 2010, 19:26
I started my project out in Visual Studio 2008 using Qt4 Visual Studio Add-in 1.1.4. I forgot to add support for OpenGL, so I just generated a pro file, tweaked it, and ran 'qmake -t vcapp <project>' to generate a new VS2008 project file.

Everything compiles fine, but when I go to run it, I get an error about missing QtSqld4.dll.

Here is my pro file:

TEMPLATE = app
TARGET = ImgCapture2
QT += core gui sql opengl
CONFIG += debug
DEFINES += QT_LARGEFILE_SUPPORT QT_SQL_LIB _WINDOWS
INCLUDEPATH += ./GeneratedFiles .
LIBS += -lWinmm -lopengl32 -lglu32
PRECOMPILED_HEADER = StdAfx.h
DEPENDPATH += .
UI_DIR += ./GeneratedFiles
RCC_DIR += ./GeneratedFiles

win32:RC_FILE = ImgCapture2.rc

CONFIG(debug, debug|release) {
OBJECTS_DIR += debug
DESTDIR = ../Debug
MOC_DIR += ./GeneratedFiles/debug
INCLUDEPATH += ./GeneratedFiles/Debug
} else {
OBJECTS_DIR += release
DESTDIR = ../Release
MOC_DIR += ./GeneratedFiles/Release
INCLUDEPATH += ./GeneratedFiles/Release
}

include(ImgCapture2.pri)

scarleton
5th September 2010, 14:23
don't know how I fixed it, but this pro file seems to work:

# ----------------------------------------------------
# This file is generated by the Qt Visual Studio Add-in.
# ------------------------------------------------------

TEMPLATE = vcapp
TARGET = ImgCapture2
QT += sql opengl
CONFIG += debug_and_release
DEFINES += QT_LARGEFILE_SUPPORT QT_SQL_LIB _WINDOWS
QTPLUGIN += qjpeg qtiff
INCLUDEPATH += ./GeneratedFiles .
LIBS += -lopengl32 -lglu32
PRECOMPILED_HEADER = StdAfx.h
DEPENDPATH += .
UI_DIR += ./GeneratedFiles
RCC_DIR += ./GeneratedFiles

win32:RC_FILE = ImgCapture2.rc

CONFIG(debug, debug|release) {
DESTDIR = ../Debug
LIBS += -L../Debug
OBJECTS_DIR += Debug
MOC_DIR += ./GeneratedFiles/Debug
INCLUDEPATH += ./GeneratedFiles/Debug
} else {
DESTDIR = ../Release
LIBS += -L../Release
OBJECTS_DIR += Release
MOC_DIR += ./GeneratedFiles/Release
INCLUDEPATH += ./GeneratedFiles/Release
}

include(ImgCapture2.pri)

scarleton
5th September 2010, 14:26
side note: I got a lot more Qt warning with the new project then I did with the old one, the big one is warning that variables where not being used, I got some other warnings, too. I fixed them all, fore I hate warning. The question is:

Why didn't I get the warnings with the project file generated by the add in?