在Qt中编译InterBase支持 [英] Compiling InterBase support in Qt
问题描述
我已按照 http://doc.qt上的说明进行操作. nokia.com/stable/sql-driver.html#qibase 用于将Interbase支持编译到Qt中,并确保我所有的库都位于正确的位置. qmake运行成功,但是当我运行nmake时,在qsql_ibase.cpp中出现了一系列未定义的引用错误.如果我在Qt Creator中打开.pro并将鼠标悬停在引发未定义参考错误的函数之一上,并跟随符号(F2),它将带我到声明它的ibase.h文件.是否由于没有函数定义而引发未定义的引用错误?如果是这样,为什么为什么没有给我关于缺少库的任何错误?
I have followed the instructions on http://doc.qt.nokia.com/stable/sql-driver.html#qibase for compiling Interbase support into Qt, and made sure all of my libraries are in the right place. qmake runs successfully, but when I run nmake, I get a series of undefined reference errors in qsql_ibase.cpp. If I open up the .pro in Qt Creator and hover over one of the functions that is throwing the undefined reference errors and follow the symbol (F2), it takes me to the ibase.h file where it is declared. Is it throwing the undefined reference errors because there is no function definition? If that is the case, why isn't it giving me any errors about a missing library?
输出示例:
创建库文件:debug \ libqsqlibased4.a debug/qsql_ibase.o:在函数
getIBaseError': C:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\ibase/../../../sql/drivers/ibase /qsql_ibase.cpp:80: undefined reference to
isc_sqlcode'中 C:\ QtSDK \ QtSources \ 4.7.4 \ src \ plugins \ sqldrivers \ ibase/../../../sql/drivers/ibase /qsql_ibase.cpp:85:对isc_interprete' debug/qsql_ibase.o:C:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\ibase/../../. ./sql/drivers/ibase/qsql_ibase.cpp:406: undefined reference to
isc_dsql_free_st的未定义引用 atement" debug/qsql_ibase.o:C:\ QtSDK \ QtSources \ 4.7.4 \ src \ plugins \ sqldrivers \ ibase/../../. ./sql/drivers/ibase/qsql_ibase.cpp:421:对isc_create_blob2 ' debug/qsql_ibase.o:C:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\ibase/../../. ./sql/drivers/ibase/qsql_ibase.cpp:427: undefined reference to
isc_put_segment'
Creating library file: debug\libqsqlibased4.a debug/qsql_ibase.o: In function
getIBaseError': C:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\ibase/../../../sql/drivers/ibase /qsql_ibase.cpp:80: undefined reference to
isc_sqlcode' C:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\ibase/../../../sql/drivers/ibase /qsql_ibase.cpp:85: undefined reference toisc_interprete' debug/qsql_ibase.o:C:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\ibase/../../. ./sql/drivers/ibase/qsql_ibase.cpp:406: undefined reference to
isc_dsql_free_st atement' debug/qsql_ibase.o:C:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\ibase/../../. ./sql/drivers/ibase/qsql_ibase.cpp:421: undefined reference toisc_create_blob2 ' debug/qsql_ibase.o:C:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\ibase/../../. ./sql/drivers/ibase/qsql_ibase.cpp:427: undefined reference to
isc_put_segment'
这继续导致更多错误,所有未定义的引用.
This continues for many more errors, all undefined references.
推荐答案
很抱歉提出了这么古老的主题,但是我找到了一个解决方案,并希望与大家分享.问题是由于条件编译定义,未在Interbase的SDK中定义宏ISC_EXPORT
.在此处查看详细信息-如何通过MinGW为Qt构建Interbase插件
Sorry for raising so old theme, but I found a solution and want to share with it. The problem is that macro ISC_EXPORT
was not defined in Interbase's SDK due to conditional compilation defines. See details here - Howto build Interbase plugin for Qt by MinGW
这篇关于在Qt中编译InterBase支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!