【发布时间】:2012-10-18 18:54:02
【问题描述】:
我有一个 qt .pro 文件,看起来像这样:
TEMPLATE = app
TARGET = demoqt
DESTDIR = ./debug
QT += core gui
CONFIG += debug
DEFINES += QT_LARGEFILE_SUPPORT QT_DLL
HEADERS += ./src/MainWindow.h
SOURCES += ./src/MainWindow.cpp ./src/main.cpp
在windows下构建成功,文件如下:
@echo off
echo Setting up a Qt environment...
set QTDIR=C:\Qt\4.8.3
set PATH=C:\Qt\4.8.3\bin;%PATH%
set QMAKESPEC=win32-msvc2010
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
qmake
nmake
我完全没有使用 makefile 的经验——我完全做到了这一点。我遇到的问题是必要的 Qt DLL 文件没有被复制到输出目录。因此,当我执行我的可执行文件时,我会收到诸如 The program can't start because QtGuid4.dll is missing from your computer. Try reinsalling the program to fix this problem.
【问题讨论】: