我需要Qt的ibase驱动程序才能与Firebird数据库一起使用。 我安装了:
我尝试将其设为an official site described,但替换
cd %QTDIR%\qtbase\src\plugins\sqldrivers\ibase
qmake "INCLUDEPATH+=C:/interbase/include" "LIBS+=-lfbclient" ibase.pro
用它: 在c:\ windows \ system32
中创建库fbclient.dllC:\Program Files\Firebird\Firebird_2_1\bin\instclient i f
比编译驱动程序ibase:
C:\Qt\5.5\Src\qtbase\src\plugins\sqldrivers\ibase>qmake INCLUDEPATH+='C:\Program Files\Firebird\Firebird_2_1\include'" "LIBS+=-LC:\Windows\system32\fbclient.dll" ibase.pro
Project ERROR: Cannot load qmodule.pri!
Error processing project file: ibase.pro
在我尝试用qt 5.1.0(mingw32)编译之前,没有错误。 但是使用qt 5.1.0(mingw32)我无法链接fbclient.dll(可能是用MSVS编译的)。由于difference编译器(使用MSVC编译的firebird,并且使用qt mingw)决定切换到QT 5.5.1(使用msvc2010)。
如果我使用 -d 运行qmake,而不是
C:\Qt\5.5\Src\qtbase\src\plugins\sqldrivers\ibase>qmake "INCLUDEPATH+='C:\Program Files\Firebird\Firebird_2_1\include'" "LIBS+=-LC:\Windows\system32\fbclient.dll" i base.pro -d
DEBUG 1: Resetting dir to: C:\Qt\5.5\Src\qtbase\src\plugins\sqldrivers\ibase
DEBUG 1: visiting file C:/Qt/5.5/Src/qtbase/.qmake.conf
DEBUG 1: C:/Qt/5.5/Src/qtbase/.qmake.conf: entering block
DEBUG 1: C:/Qt/5.5/Src/qtbase/.qmake.conf:1: evaluating test function "load"
DEBUG 1: C:/Qt/5.5/Src/qtbase/.qmake.conf:1: calling built-in load(qt_build_config)
DEBUG 1: visiting file C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf: entering block
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:12: NOT
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:12: evaluating test function "contains"
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:12: calling built-in contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri)
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:12: test function returned false
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:12: taking 'then' branch
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:12: entering block
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:13: QMAKE_QT_MODULE := C:/work/build/PADDING/mkspecs/qmodule.pri
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:14: NOT
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:14: evaluating test function "exists"
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:14: calling built-in exists(C:/work/build/PADDING/mkspecs/qmodule.pri)
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:14: test function returned false
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:14: OR
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:14: NOT
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:14: skipped test function "include"
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:14: taking 'then' branch
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:14: entering block
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:15: evaluating test function "error"
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:15: calling built-in error("Cannot load qmodule.pri!")
Project ERROR: Cannot load qmodule.pri!
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:15: aborting block, function status: error
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:15: finished 'then' branch
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:15: aborting block, status: error
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:15: finished 'then' branch
DEBUG 1: C:/Qt/5.5/Src/qtbase/mkspecs/features/qt_build_config.prf:15: aborting block, status: error
DEBUG 1: C:/Qt/5.5/Src/qtbase/.qmake.conf:1: aborting block, function status: error
Error processing project file: ibase.pro
此档案
QMAKE_QT_MODULE:= C:/work/build/PADDING/mkspecs/qmodule.pri
在我的系统中不存在,我认为必须是
c:\Qt\5.5\msvc2010\mkspecs\qmodule.pri
系统变量路径中的值Qt表示某些内容未配置或配置错误:
C:\Qt\5.5\Src\qtbase\src\plugins\sqldrivers\ibase>qmake -query
QT_SYSROOT:
QT_INSTALL_PREFIX:C:/work/build/PADDING
QT_INSTALL_ARCHDATA:C:/work/build/PADDING
QT_INSTALL_DATA:C:/work/build/PADDING
QT_INSTALL_DOCS:C:/work/build/PADDING/doc
QT_INSTALL_HEADERS:C:/work/build/PADDING/include
QT_INSTALL_LIBS:C:/work/build/PADDING/lib
QT_INSTALL_LIBEXECS:C:/work/build/PADDING/bin
QT_INSTALL_BINS:C:/work/build/PADDING/bin
QT_INSTALL_TESTS:C:/work/build/PADDING/tests
QT_INSTALL_PLUGINS:C:/work/build/PADDING/plugins
QT_INSTALL_IMPORTS:C:/work/build/PADDING/imports
QT_INSTALL_QML:C:/work/build/PADDING/qml
QT_INSTALL_TRANSLATIONS:C:/work/build/PADDING/translations
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:C:/work/build/PADDING/examples
QT_INSTALL_DEMOS:C:/work/build/PADDING/examples
QT_HOST_PREFIX:C:/work/build/PADDING
QT_HOST_DATA:C:/work/build/PADDING
QT_HOST_BINS:C:/work/build/PADDING/bin
QT_HOST_LIBS:C:/work/build/PADDING/lib
QMAKE_SPEC:win32-msvc2010
QMAKE_XSPEC:win32-msvc2010
QMAKE_VERSION:3.0
QT_VERSION:5.5.1
现在我考虑重新安装QT。 但我可以检查/尝试解决这个问题?
答案 0 :(得分:1)
我认为干净安装QT解决了这个问题。 因此,我们将MS Visual Studio 2010 Express SP1(必要的SP1),QT 5.1.1(msvc2010),Src / Essentials。也是Firebird。我在zip文件中使用了2.5.5版本并将其解压缩到C:\ QT \ firebird255_32中。解包后还要复制文件C:\ QT \ firebird255_32 \ lib \ fbclient_ms.lib并将其命名为C:\ QT \ firebird255_32 \ lib \ gds32_ms.lib。
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat
C:\Qt\5.5\Src\qtbase\src\plugins\sqldrivers\ibase>qmake "INCLUDEPATH+=C:/QT/firebird255_32/include" "LIBS+=-LC:/QT/firebird255_32/lib" ibase.pro
C:\Qt\5.5\Src\qtbase\src\plugins\sqldrivers\ibase>nmake
如果一切顺利,那么将出现文件夹c:\ Qt \ 5.5 \ Src \ qtbase \ plugins \ sqldrivers \ files:
qsqlibase.dll qsqlibase.exp qsqlibase.lib qsqlibased.dll qsqlibased.exp qsqlibased.ilk qsqlibased.lib qsqlibased.pdb
要复制到文件夹c:\ Qt \ 5.5 \ msvc2010 \ plugins \ sqldrivers。 由于主要目标是成功编译,因此这些库尚未在应用程序中进行测试。您还应该注意我在系统中未安装Firebird版本(可能是应用程序的传输问题)。 Here也是成功构建此驱动程序的一个示例,甚至是C编译器mingw。或许,它不必使用它msvc2010。