我已经成功的安装了qwt,并且将example目录下的例子也成功编译了,使用的是源文件中的pro文件。但是当我用qmake -project,qmake,make再重新编译example下的bode目录后(在bode.pro里指定了相关的qwt include文件路径和qwt5.dll路径,也加入了qt += -lqwt),也生成了exe文件,但是这个exe文件有2M多大,但刚开始编译qwt中生成的exe文件只有70.5K,而且运行后面生成的文件,会弹出一个
对话框,说是应用程序正常初始化(0xc0000005)失败。请单击确定,中止应用程序。
我可以肯定不是qwt5.dll的问题,因为我把qwt5.dll移到了bode.exe的当前目录下,源程序也没有问题,因为是直接从example\bode下拷过来的,想来想去,只能是qmake的问题了
但是有谁可以告诉我是什么原因呢?qmake生成的pro文件不能用?
以下是自动生成的pro文件:
######################################################################
# Automatically generated by qmake (2.01a) ??? ?? 22 08:38:35 2007
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
INCLUDEPATH += c:\qwt\include
# Input
HEADERS += bode.h bode_plot.h cplx.h pixmaps.h
SOURCES += bode.cpp bode_plot.cpp
LIBS += c:\qwt\lib\qwt5.dll
QT += -lqwt
以下是example\bode原来的pro文件:
# -*- mode: sh -*- ################################################
# Qwt Widget Library
# Copyright (C) 1997 Josef Wilgen
# Copyright (C) 2002 Uwe Rathmann
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the Qwt License, Version 1.0
###################################################################
include( ../examples.pri )
TARGET = bode
HEADERS = \
bode.h \
bode_plot.h \
cplx.h \
pixmaps.h
SOURCES = \
bode.cpp \
bode_plot.cpp
以下是..\examples.pri文件的内容:
# -*- mode: sh -*- ################################################
# Qwt Widget Library
# Copyright (C) 1997 Josef Wilgen
# Copyright (C) 2002 Uwe Rathmann
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the Qwt License, Version 1.0
###################################################################
include( ../../qwtconfig.pri )
TEMPLATE = app
MOC_DIR = moc
OBJECTS_DIR = obj
INCLUDEPATH += ../../src
DEPENDPATH += ../../src
unix:LIBS += -L../../lib -lqwt
win32:QwtDll {
DEFINES += QT_DLL QWT_DLL
}
win32-msvc:LIBS += ../../lib/qwt5.lib
win32-msvc.net:LIBS += ../../lib/qwt5.lib
win32-msvc2005:LIBS += ../../lib/qwt5.lib
win32-g++:LIBS += -L../../lib -lqwt
[ 此贴被XChinux在2008-07-18 16:44重新编辑 ]