- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我在为 Qt 构建 QIBASE SQL 驱动程序时遇到问题,以便能够在 OS X 上将 Firebird 与 Qt 一起使用。
我找到了这个快速指南:http://qt-project.org/doc/qt-4.8/sql-driver.html#qibase但它似乎不正确。
Firebird 已安装,其头文件为:
/Library/Frameworks/Firebird.framework/Headers/
dylib 文件是:
/Library/Frameworks/Firebird.framework/Libraries/
我已经从以下位置下载了 Qt 4.8.4 源:http://qt-project.org/downloads#qt-lib并将其提取到:
~/devel/qt
所以我更改了第一个链接上的代码:
cd $QTDIR/src/plugins/sqldrivers/ibase
qmake "INCLUDEPATH+=/opt/interbase/include" "LIBS+=-L/opt/interbase/lib -lfbclient" ibase.pro
make
收件人:
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 中得到以下错误:
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
我得到的唯一结果是:
~/devel/qt/src/sql/kernel/qsqlcachedresult_p.h
~/devel/qt/include/QtSql/private/qsqlcachedresult_p.h
切记,它似乎不作为我安装的 Qt SDK 的一部分存在,它位于 /Library/Frameworks/Qt*.framework
的默认位置。
所以我尝试将 devel qt src 文件添加到 INCLUDEPATH 并尝试再次运行 qmake:
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 配置不正确,请运行配置”
和 错误:../../src/corelib/global/qconfig.h:没有这样的文件或目录
。 make 返回的所有内容都在这里:
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
有人知道我做错了什么吗?
最佳答案
修复它,以供将来引用:
我打开了 ibase.pro
并添加了以下几行:
INCLUDEPATH += /Library/Frameworks/Firebird.framework/Headers
LIBS += -framework Firebird
然后我打开了 qsql_ibase.pri
并删除了以下几行:
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
文件创建了一个符号链接(symbolic link),所以它是所有其他 Qt 头文件所在的位置:
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 驱动程序:
cd ~/devel/qt/src/plugins/sqldrivers/ibase
qmake -spec macx-g++ ibase.pro
make
关于c++ - 在 OS X 上构建 Qt QIBASE 驱动程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15341663/
我正在尝试为基于 arm 的板交叉编译驱动程序。在 make 文件中,包含文件的搜索路径是主机内核的路径,即它指向 ubuntu 附带的 linux 头文件。我在主机系统(i7/ubuntu)上也有目
1、准备材料 开发板(正点原子stm32f407探索者开发板V2.4) 。 STM32CubeMX软件(Version 6.10.0) 。 野火DAP仿真器 。 keil µVis
是否可以通过 c# 应用程序“驱动”excel(即从 excel gui 下拉列表中选择某些内容,按下按钮并读取特定单元格的内容)? 这并不是真正用于测试,而是用于类似于 selenium 的数据报废
给定任何具有超过 5 个 View 和 View 模型的中间 MVVM 应用程序,是否有任何推荐的设计模式来说明如何为此类应用程序搭建脚手架? 现在我通常有一个在 App.OnStartup 中创建的
我想知道如何使用曼哈顿距离启发式来驱动 NxN 二维数组中的搜索。我有以下曼哈顿距离: private int manhattan(int[] pos, int tile) { int
我试图了解 CUmodule 在 CUDA 驱动程序 API 函数中实际上代表什么。 许多 CUDA 驱动程序 API 函数都有一个 CUmodule 句柄,但它是什么?它是引导驱动程序调用过程的 d
我正在尝试创建一个 java 程序,它将创建 excel 文件并将其上传到谷歌驱动器中。上传后我需要它来授予权限。我已经完成了所有这些,但问题在于尝试将 excel 文件转换为 google 文件,以
我正在拼命尝试从 Linux(Raspbian 内核 4.4.12-v7+)与使用 TIUSB3410 USB 部件的设备进行通信。 这是 dmesg 的输出: [ 2730.016013] usb
我有一个关于在 PCIe 上使用突发读写的问题。我有一个 fpga,它通过 PCIe 连接到 cpu。我有一个简单的驱动程序,仅用于测试。驱动程序向 FPGA 写入数据以及从 FPGA 读取数据。 f
我有大约 500 条通往特定页面的可能路径,我需要测试所有这些路径。该页面的每个路径看起来都类似于此(使用 PHP 网络驱动程序;通常有大约 10 个步骤): // Navigate to form
如果chrome驱动的版本和当前的chrome版本不同,我想写一个python代码,下载并运行与当前chrome版本匹配的chrome驱动。 这就是我一直在寻找的东西 driver = webdriv
我在 Centos 7 Linux 机器上尝试通过 pyodbc 连接到 SQL 数据库。我了解到您需要设置 DSN,您可以通过安装 freetds 驱动程序并执行以下操作来实现: import py
是否可以使用 NUnit 通过 NDepend 运行 CQL 查询?如果能够将 NDepend dll 包含在 UnitTests 库中并编写如下测试,那就太好了: [Test] public voi
我在 cassandra 中有巨大的表,超过 20 亿行并且还在增加。这些行有一个日期字段,它遵循日期桶模式以限制每一行。 即便如此,对于某个特定日期,我也有超过一百万条条目。 我想尽快读取和处理每一
考虑以下示例,其中一个模块的输出 (inner::out) 应该驱动两个输出(outer::out 和 outer::out2) 的上层层次: #include SC_MODULE(inner) {
我不确定是否可以有一个具有多个 MySQL 根的连接器。当我尝试只使用一根根时,它效果完美。我的有 2 个根的代码如下所示: [ 'locale' => 'es_ES.UTF-8',
我的桌面APP无法注册Mysql JDBC驱动 我下载mysql-connector-java-5.1.16.zip 解压mysql-connector-java-5.1.16-bin.jar并将其放
我有一个无限循环等待输入的 python 脚本,然后输入发生时做一些事情。我的问题是制作 python告诉 emacs 做某事。我只需要一些方法来发送 emacs 输入并让 emacs 评估该输入。
我最初问的没有明确说明我的问题/问题,所以我会更好地解释它。我有一个将 JDialog 设置为可见的 JButton。 JDialog 有一个 WindowListener 将其设置为在 window
假设“doc”是我想插入到 MongoDB 集合中的一些文档,而“collection”是我要将文档插入到的集合。 我有如下内容: try { WriteConcern wc = new Wr
我是一名优秀的程序员,十分优秀!