首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在OS X上构建Qt QIBASE驱动程序

在OS X上构建Qt QIBASE驱动程序
EN

Stack Overflow用户
提问于 2013-03-11 22:54:54
回答 1查看 1.1K关注 0票数 2

我在为Qt构建QIBASE SQL驱动程序时遇到了问题,以便能够在OS上使用Firebird和Qt。

我找到了这个快速指南:http://qt-project.org/doc/qt-4.8/sql-driver.html#qibase,但它似乎不正确。

Firebird已安装,其头文件为:

代码语言:javascript
复制
/Library/Frameworks/Firebird.framework/Headers/

dylib文件是:

代码语言:javascript
复制
/Library/Frameworks/Firebird.framework/Libraries/

我已经从:http://qt-project.org/downloads#qt-lib下载了Qt 4.8.4源代码,并将其解压缩到:

代码语言:javascript
复制
~/devel/qt

因此,我将第一个链接上的代码更改为:

代码语言:javascript
复制
cd $QTDIR/src/plugins/sqldrivers/ibase
qmake "INCLUDEPATH+=/opt/interbase/include" "LIBS+=-L/opt/interbase/lib -lfbclient" ibase.pro
make

至:

代码语言:javascript
复制
cd ~/devel/qt/src/plugins/sqldrivers/ibase
qmake -spec macx-g++ "INCLUDEPATH+=/Library/Frameworks/Firebird.framework/Headers" "LIBS+=-L/Library/Frameworks/Firebird.framework/Libraries -lfbclient" ibase.pro
make

我从make中得到了以下错误:

代码语言:javascript
复制
In file included from main.cpp:44:
../../../sql/drivers/ibase/qsql_ibase.h:47:46: error: QtSql/private/qsqlcachedresult_p.h: No such file or directory
In file included from main.cpp:44:
../../../sql/drivers/ibase/qsql_ibase.h:58: error: expected class-name before ‘{’ token
../../../sql/drivers/ibase/qsql_ibase.h:70: error: ‘QSqlCachedResult’ has not been declared
../../../sql/drivers/ibase/qsql_ibase.h:70: error: expected ‘,’ or ‘...’ before ‘&’ token
make[1]: *** [debug/main.o] Error 1
make: *** [debug] Error 2

所以我运行mdfind qsqlcachedresult_p.h | grep qsqlcachedresult_p.h,得到的唯一结果是:

代码语言:javascript
复制
~/devel/qt/src/sql/kernel/qsqlcachedresult_p.h
~/devel/qt/include/QtSql/private/qsqlcachedresult_p.h

请记住,它似乎并不是我安装的Qt的一部分,它位于/Library/Frameworks/Qt*.framework的默认位置。

因此,我尝试将devel qt src文件添加到INCLUDEPATH中,并再次尝试运行qmake:

代码语言:javascript
复制
cd ~/devel/qt/src/plugins/sqldrivers/ibase
qmake -spec macx-g++ "INCLUDEPATH+=~/devel/qt/include" "INCLUDEPATH+=/Library/Frameworks/Firebird.framework/Headers" "LIBS+=-L/Library/Frameworks/Firebird.framework/Libraries -lfbclient" ibase.pro
make

但是现在我得到了一大堆“没有命名类型”的错误,还有error: #error "Qt has not been ported to this architecture"error: #error "Qt not configured correctly, please run configure"error: ../../src/corelib/global/qconfig.h: No such file or directory。make返回的所有内容如下所示:

代码语言:javascript
复制
In file included from ../../../../include/QtCore/../../src/corelib/global/qglobal.h:62,
                 from ../../../../include/QtCore/qglobal.h:1,
                 from ../../../../include/QtCore/../../src/corelib/global/qnamespace.h:45,
                 from ../../../../include/QtCore/qnamespace.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobjectdefs.h:45,
                 from ../../../../include/QtCore/qobjectdefs.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:47,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/qconfig.h:1:46: error: ../../src/corelib/global/qconfig.h: No such file or directory
make -f Makefile.Debug
g++ -c -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -fPIC -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.8/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtSql.framework/Versions/4/Headers -I/usr/include/QtSql -I/usr/include -I../../../../include -I/Library/Frameworks/Firebird.framework/Versions/A/Headers -Idebug -F/Library/Frameworks -o debug/main.o main.cpp
In file included from ../../../../include/QtCore/qglobal.h:1,
                 from ../../../../include/QtCore/../../src/corelib/global/qnamespace.h:45,
                 from ../../../../include/QtCore/qnamespace.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobjectdefs.h:45,
                 from ../../../../include/QtCore/qobjectdefs.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:47,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/global/qglobal.h:1572:4: error: #error "Qt not configured correctly, please run configure"
../../../../include/QtCore/../../src/corelib/global/qglobal.h:2705:6: error: #error "Qt not configured correctly, please run configure"
In file included from ../../../../include/QtCore/qatomic_arch.h:1,
                 from ../../../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:227,
                 from ../../../../include/QtCore/qbasicatomic.h:1,
                 from ../../../../include/QtCore/../../src/corelib/thread/qatomic.h:46,
                 from ../../../../include/QtCore/qatomic.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qbytearray.h:45,
                 from ../../../../include/QtCore/qbytearray.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qstring.h:46,
                 from ../../../../include/QtCore/qstring.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:48,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/arch/qatomic_arch.h:96:4: error: #error "Qt has not been ported to this architecture"
In file included from ../../../../include/QtCore/qnamespace.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobjectdefs.h:45,
                 from ../../../../include/QtCore/qobjectdefs.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:47,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/global/qnamespace.h:51: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qobjectdefs.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:47,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/kernel/qobjectdefs.h:51: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qchar.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qstring.h:45,
                 from ../../../../include/QtCore/qstring.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:48,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/tools/qchar.h:51: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qbasicatomic.h:1,
                 from ../../../../include/QtCore/../../src/corelib/thread/qatomic.h:46,
                 from ../../../../include/QtCore/qatomic.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qbytearray.h:45,
                 from ../../../../include/QtCore/qbytearray.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qstring.h:46,
                 from ../../../../include/QtCore/qstring.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:48,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:51: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qatomic.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qbytearray.h:45,
                 from ../../../../include/QtCore/qbytearray.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qstring.h:46,
                 from ../../../../include/QtCore/qstring.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:48,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/thread/qatomic.h:52: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qbytearray.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qstring.h:46,
                 from ../../../../include/QtCore/qstring.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:48,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/tools/qbytearray.h:71: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qstring.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:48,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/tools/qstring.h:73: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qiterator.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qlist.h:45,
                 from ../../../../include/QtCore/qlist.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:50,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/tools/qiterator.h:58: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qalgorithms.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qlist.h:47,
                 from ../../../../include/QtCore/qlist.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:50,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/tools/qalgorithms.h:51: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qlist.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:50,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/tools/qlist.h:66: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qscopedpointer.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:54,
                 from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:49: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qobject.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:45,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/kernel/qobject.h:60: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qpointer.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:46,
                 from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/kernel/qpointer.h:51: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qplugin.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:45,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/plugin/qplugin.h:52: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qiodevice.h:1,
                 from ../../../../include/QtCore/../../src/corelib/io/qdatastream.h:46,
                 from ../../../../include/QtCore/qdatastream.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qstringlist.h:46,
                 from ../../../../include/QtCore/qstringlist.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qfactoryinterface.h:46,
                 from ../../../../include/QtCore/qfactoryinterface.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:46,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/io/qiodevice.h:61: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qdatastream.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qstringlist.h:46,
                 from ../../../../include/QtCore/qstringlist.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qfactoryinterface.h:46,
                 from ../../../../include/QtCore/qfactoryinterface.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:46,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/io/qdatastream.h:57: error: ‘QtValidLicenseForCoreModule’ does not name a type
../../../../include/QtCore/../../src/corelib/io/qdatastream.h:97: error: ‘BigEndian’ is not a member of ‘QSysInfo’
../../../../include/QtCore/../../src/corelib/io/qdatastream.h:98: error: ‘LittleEndian’ is not a member of ‘QSysInfo’
In file included from ../../../../include/QtCore/qregexp.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qstringlist.h:48,
                 from ../../../../include/QtCore/qstringlist.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qfactoryinterface.h:46,
                 from ../../../../include/QtCore/qfactoryinterface.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:46,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/tools/qregexp.h:56: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qstringmatcher.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qstringlist.h:50,
                 from ../../../../include/QtCore/qstringlist.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qfactoryinterface.h:46,
                 from ../../../../include/QtCore/qfactoryinterface.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:46,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/tools/qstringmatcher.h:51: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qstringlist.h:1,
                 from ../../../../include/QtCore/../../src/corelib/plugin/qfactoryinterface.h:46,
                 from ../../../../include/QtCore/qfactoryinterface.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:46,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/tools/qstringlist.h:59: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qfactoryinterface.h:1,
                 from /Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:46,
                 from main.cpp:42:
../../../../include/QtCore/../../src/corelib/plugin/qfactoryinterface.h:52: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from main.cpp:42:
/Library/Frameworks/QtSql.framework/Versions/4/Headers/qsqldriverplugin.h:52: error: ‘QtValidLicenseForSqlModule’ does not name a type
In file included from ../../../../include/QtCore/qmetatype.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qvariant.h:48,
                 from ../../../../include/QtCore/qvariant.h:1,
                 from ../../../../include/QtSql/../../src/sql/kernel/qsqlresult.h:45,
                 from ../../../../include/QtSql/qsqlresult.h:1,
                 from ../../../sql/drivers/ibase/qsql_ibase.h:45,
                 from main.cpp:44:
../../../../include/QtCore/../../src/corelib/kernel/qmetatype.h:60: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qmap.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qvariant.h:49,
                 from ../../../../include/QtCore/qvariant.h:1,
                 from ../../../../include/QtSql/../../src/sql/kernel/qsqlresult.h:45,
                 from ../../../../include/QtSql/qsqlresult.h:1,
                 from ../../../sql/drivers/ibase/qsql_ibase.h:45,
                 from main.cpp:44:
../../../../include/QtCore/../../src/corelib/tools/qmap.h:59: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qpair.h:1,
                 from ../../../../include/QtCore/../../src/corelib/tools/qhash.h:49,
                 from ../../../../include/QtCore/qhash.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qvariant.h:50,
                 from ../../../../include/QtCore/qvariant.h:1,
                 from ../../../../include/QtSql/../../src/sql/kernel/qsqlresult.h:45,
                 from ../../../../include/QtSql/qsqlresult.h:1,
                 from ../../../sql/drivers/ibase/qsql_ibase.h:45,
                 from main.cpp:44:
../../../../include/QtCore/../../src/corelib/tools/qpair.h:51: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qhash.h:1,
                 from ../../../../include/QtCore/../../src/corelib/kernel/qvariant.h:50,
                 from ../../../../include/QtCore/qvariant.h:1,
                 from ../../../../include/QtSql/../../src/sql/kernel/qsqlresult.h:45,
                 from ../../../../include/QtSql/qsqlresult.h:1,
                 from ../../../sql/drivers/ibase/qsql_ibase.h:45,
                 from main.cpp:44:
../../../../include/QtCore/../../src/corelib/tools/qhash.h:55: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qvariant.h:1,
                 from ../../../../include/QtSql/../../src/sql/kernel/qsqlresult.h:45,
                 from ../../../../include/QtSql/qsqlresult.h:1,
                 from ../../../sql/drivers/ibase/qsql_ibase.h:45,
                 from main.cpp:44:
../../../../include/QtCore/../../src/corelib/kernel/qvariant.h:57: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtCore/qvector.h:1,
                 from ../../../../include/QtSql/../../src/sql/kernel/qsqlresult.h:46,
                 from ../../../../include/QtSql/qsqlresult.h:1,
                 from ../../../sql/drivers/ibase/qsql_ibase.h:45,
                 from main.cpp:44:
../../../../include/QtCore/../../src/corelib/tools/qvector.h:64: error: ‘QtValidLicenseForCoreModule’ does not name a type
In file included from ../../../../include/QtSql/qsql.h:1,
                 from ../../../../include/QtSql/../../src/sql/kernel/qsqlresult.h:47,
                 from ../../../../include/QtSql/qsqlresult.h:1,
                 from ../../../sql/drivers/ibase/qsql_ibase.h:45,
                 from main.cpp:44:
../../../../include/QtSql/../../src/sql/kernel/qsql.h:51: error: ‘QtValidLicenseForSqlModule’ does not name a type
In file included from ../../../../include/QtSql/qsqlresult.h:1,
                 from ../../../sql/drivers/ibase/qsql_ibase.h:45,
                 from main.cpp:44:
../../../../include/QtSql/../../src/sql/kernel/qsqlresult.h:53: error: ‘QtValidLicenseForSqlModule’ does not name a type
In file included from ../../../../include/QtSql/qsqldriver.h:1,
                 from ../../../sql/drivers/ibase/qsql_ibase.h:46,
                 from main.cpp:44:
../../../../include/QtSql/../../src/sql/kernel/qsqldriver.h:57: error: ‘QtValidLicenseForSqlModule’ does not name a type
make[1]: *** [debug/main.o] Error 1
make: *** [debug] Error 2

有人知道我做错了什么吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-03-12 22:52:36

已修复,以备将来参考:

我打开了ibase.pro并添加了以下行:

代码语言:javascript
复制
INCLUDEPATH += /Library/Frameworks/Firebird.framework/Headers
LIBS += -framework Firebird

然后,我打开了qsql_ibase.pri并删除了以下行:

代码语言:javascript
复制
unix {
    !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS += -lgds
} else {
    !contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) {
        win32-borland:LIBS += gds32.lib
        else:LIBS += -lgds32_ms
    }
}

然后我为神秘的qsqlcachedresult_p.h文件创建了一个符号链接,所以它是所有其他Qt头文件的位置:

代码语言:javascript
复制
mkdir /Library/Frameworks/QtSql.framework/Headers/private
ln -s ~/devel/qt/src/sql/kernel/qsqlcachedresult_p.h /Library/Frameworks/QtSql.framework/Headers/private/qsqlcachedresult_p.h

QIBASE驱动程序现在可以像这样构建:

代码语言:javascript
复制
cd ~/devel/qt/src/plugins/sqldrivers/ibase
qmake -spec macx-g++ ibase.pro
make
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15341663

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档