[vtkusers] vtk qt sql linking errors (resolved)

Karl Merkley karl at elemtech.com
Tue May 24 17:04:01 EDT 2011


I got it to compile by modifying the CMakeLists.txt QVTK project.   The vtkSQLDatabase.cpp stuff is now in vtkIO.   At line 137 in the CMakeLists.txt I added vtkIO to the TARGET_LINK_LIBRARIES (after vtkRendering) and the symbols are now resolved.   I'm still not sure why SQL is required in this case but this is a fix.   It would be helpful if someone propagated this into the current source.

   Karl

On May 24, 2011, at 2:31 PM, Karl Merkley wrote:

> I just downloaded 5.6.1 and I'm seeing the same problems on Win32.   I have Qt on because I want to use the QVTKWidget.  I am also building with shared libraries, and rendering.   I don't want or need SQL either.
> 
> Have you gotten any help on this today?
> 
>     Karl
> 
> On May 21, 2011, at 8:47 AM, Mark Roden wrote:
> 
>> So I'm trying to build vtk that I just synced from master, and getting
>> 45 linker errors.  They are all related to using Qt and SQL, which I
>> just don't want or need (I need the visualization of the toolkit, not
>> the database manipulations).  How can I get around these linker
>> failures?  This is using visual studio 2008, 32 bits, on windows 7.
>> 
>> To get to this state, I have the following cmake options enabled:
>> 
>> shared libs
>> mp_flag (3)
>> qmake executable C:/Qt/4.7.2/bin/qmake.exe (that's correct)
>> use qt
>> use qt charts (enabled to try to fix the problem; it doesn't, and I
>> don't need it)
>> use rendering
>> 
>> The Qt sql directories all appear to be set properly.
>> 
>> Thanks for any help,
>> Mark
>> 
>> The linker errors are:
>> 
>> 13>vtkQtSQLDatabase.obj : error LNK2019: unresolved external symbol
>> "__declspec(dllimport) public: static int __cdecl
>> vtkSQLDatabase::IsTypeOf(char const *)"
>> (__imp_?IsTypeOf at vtkSQLDatabase@@SAHPBD at Z) referenced in function
>> "public: static int __cdecl vtkQtSQLDatabase::IsTypeOf(char const *)"
>> (?IsTypeOf at vtkQtSQLDatabase@@SAHPBD at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "__declspec(dllimport) public: static int __cdecl
>> vtkSQLDatabase::IsTypeOf(char const *)"
>> (__imp_?IsTypeOf at vtkSQLDatabase@@SAHPBD at Z)
>> 13>vtkQtSQLDatabase.obj : error LNK2019: unresolved external symbol
>> "__declspec(dllimport) public: static int __cdecl
>> vtkSQLQuery::IsTypeOf(char const *)"
>> (__imp_?IsTypeOf at vtkSQLQuery@@SAHPBD at Z) referenced in function
>> "public: static int __cdecl vtkQtSQLQuery::IsTypeOf(char const *)"
>> (?IsTypeOf at vtkQtSQLQuery@@SAHPBD at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "__declspec(dllimport) public: static int __cdecl
>> vtkSQLQuery::IsTypeOf(char const *)"
>> (__imp_?IsTypeOf at vtkSQLQuery@@SAHPBD at Z)
>> 13>vtkQtSQLDatabase.obj : error LNK2019: unresolved external symbol
>> "__declspec(dllimport) protected: virtual __thiscall
>> vtkSQLDatabase::~vtkSQLDatabase(void)"
>> (__imp_??1vtkSQLDatabase@@MAE at XZ) referenced in function
>> __unwindfunclet$??0vtkQtSQLDatabase@@IAE at XZ$0
>> 13>vtkQtSQLDatabase.obj : error LNK2019: unresolved external symbol
>> "__declspec(dllimport) protected: __thiscall
>> vtkSQLDatabase::vtkSQLDatabase(void)"
>> (__imp_??0vtkSQLDatabase@@IAE at XZ) referenced in function "protected:
>> __thiscall vtkQtSQLDatabase::vtkQtSQLDatabase(void)"
>> (??0vtkQtSQLDatabase@@IAE at XZ)
>> 13>vtkQtSQLDatabase.obj : error LNK2001: unresolved external symbol
>> "public: virtual class vtkStdString __thiscall
>> vtkSQLDatabase::GetTablePreamble(bool)"
>> (?GetTablePreamble at vtkSQLDatabase@@UAE?AVvtkStdString@@_N at Z)
>> 13>vtkQtSQLDatabase.obj : error LNK2001: unresolved external symbol
>> "public: virtual class vtkStdString __thiscall
>> vtkSQLDatabase::GetColumnSpecification(class vtkSQLDatabaseSchema
>> *,int,int)" (?GetColumnSpecification at vtkSQLDatabase@@UAE?AVvtkStdString@@PAVvtkSQLDatabaseSchema@@HH at Z)
>> 13>vtkQtSQLDatabase.obj : error LNK2001: unresolved external symbol
>> "public: virtual class vtkStdString __thiscall
>> vtkSQLDatabase::GetIndexSpecification(class vtkSQLDatabaseSchema
>> *,int,int,bool &)"
>> (?GetIndexSpecification at vtkSQLDatabase@@UAE?AVvtkStdString@@PAVvtkSQLDatabaseSchema@@HHAA_N at Z)
>> 13>vtkQtSQLDatabase.obj : error LNK2001: unresolved external symbol
>> "public: virtual class vtkStdString __thiscall
>> vtkSQLDatabase::GetTriggerSpecification(class vtkSQLDatabaseSchema
>> *,int,int)" (?GetTriggerSpecification at vtkSQLDatabase@@UAE?AVvtkStdString@@PAVvtkSQLDatabaseSchema@@HH at Z)
>> 13>vtkQtSQLDatabase.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLDatabase::EffectSchema(class
>> vtkSQLDatabaseSchema *,bool)"
>> (?EffectSchema at vtkSQLDatabase@@UAE_NPAVvtkSQLDatabaseSchema@@_N at Z)
>> 13>vtkQtSQLDatabase.obj : error LNK2019: unresolved external symbol
>> "__declspec(dllimport) protected: void __thiscall
>> vtkSQLQuery::SetDatabase(class vtkSQLDatabase *)"
>> (__imp_?SetDatabase at vtkSQLQuery@@IAEXPAVvtkSQLDatabase@@@Z) referenced
>> in function "public: virtual class vtkSQLQuery * __thiscall
>> vtkQtSQLDatabase::GetQueryInstance(void)"
>> (?GetQueryInstance at vtkQtSQLDatabase@@UAEPAVvtkSQLQuery@@XZ)
>> 13>vtkQtSQLDatabase.obj : error LNK2019: unresolved external symbol
>> "__declspec(dllimport) public: static void __cdecl
>> vtkSQLDatabase::RegisterCreateFromURLCallback(class vtkSQLDatabase *
>> (__cdecl*)(char const *))"
>> (__imp_?RegisterCreateFromURLCallback at vtkSQLDatabase@@SAXP6APAV1 at PBD@Z at Z)
>> referenced in function "public: __thiscall
>> vtkQtSQLDatabaseInitializer::vtkQtSQLDatabaseInitializer(void)"
>> (??0vtkQtSQLDatabaseInitializer@@QAE at XZ)
>> 13>vtkQtSQLDatabase.obj : error LNK2019: unresolved external symbol
>> "__declspec(dllimport) public: virtual void __thiscall
>> vtkSQLDatabase::PrintSelf(class std::basic_ostream<char,struct
>> std::char_traits<char> > &,class vtkIndent)"
>> (__imp_?PrintSelf at vtkSQLDatabase@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z)
>> referenced in function "public: virtual void __thiscall
>> vtkQtSQLDatabase::PrintSelf(class std::basic_ostream<char,struct
>> std::char_traits<char> > &,class vtkIndent)"
>> (?PrintSelf at vtkQtSQLDatabase@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z)
>> 13>vtkQtSQLQuery.obj : error LNK2019: unresolved external symbol
>> "__declspec(dllimport) public: virtual void __thiscall
>> vtkSQLQuery::PrintSelf(class std::basic_ostream<char,struct
>> std::char_traits<char> > &,class vtkIndent)"
>> (__imp_?PrintSelf at vtkSQLQuery@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z)
>> referenced in function "public: virtual void __thiscall
>> vtkQtSQLQuery::PrintSelf(class std::basic_ostream<char,struct
>> std::char_traits<char> > &,class vtkIndent)"
>> (?PrintSelf at vtkQtSQLQuery@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z)
>> 13>vtkQtSQLQuery.obj : error LNK2019: unresolved external symbol
>> "__declspec(dllimport) protected: virtual __thiscall
>> vtkSQLQuery::~vtkSQLQuery(void)" (__imp_??1vtkSQLQuery@@MAE at XZ)
>> referenced in function __unwindfunclet$??0vtkQtSQLQuery@@IAE at XZ$0
>> 13>vtkQtSQLQuery.obj : error LNK2019: unresolved external symbol
>> "__declspec(dllimport) protected: __thiscall
>> vtkSQLQuery::vtkSQLQuery(void)" (__imp_??0vtkSQLQuery@@IAE at XZ)
>> referenced in function "protected: __thiscall
>> vtkQtSQLQuery::vtkQtSQLQuery(void)" (??0vtkQtSQLQuery@@IAE at XZ)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLQuery::IsActive(void)"
>> (?IsActive at vtkSQLQuery@@UAE_NXZ)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual void __thiscall
>> vtkRowQuery::SetCaseSensitiveFieldNames(bool)"
>> (?SetCaseSensitiveFieldNames at vtkRowQuery@@UAEX_N at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall
>> vtkRowQuery::GetCaseSensitiveFieldNames(void)"
>> (?GetCaseSensitiveFieldNames at vtkRowQuery@@UAE_NXZ)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual void __thiscall
>> vtkRowQuery::CaseSensitiveFieldNamesOn(void)"
>> (?CaseSensitiveFieldNamesOn at vtkRowQuery@@UAEXXZ)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual void __thiscall
>> vtkRowQuery::CaseSensitiveFieldNamesOff(void)"
>> (?CaseSensitiveFieldNamesOff at vtkRowQuery@@UAEXXZ)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLQuery::SetQuery(char const *)"
>> (?SetQuery at vtkSQLQuery@@UAE_NPBD at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual char const * __thiscall vtkSQLQuery::GetQuery(void)"
>> (?GetQuery at vtkSQLQuery@@UAEPBDXZ)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLQuery::BeginTransaction(void)"
>> (?BeginTransaction at vtkSQLQuery@@UAE_NXZ)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLQuery::CommitTransaction(void)"
>> (?CommitTransaction at vtkSQLQuery@@UAE_NXZ)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall
>> vtkSQLQuery::RollbackTransaction(void)"
>> (?RollbackTransaction at vtkSQLQuery@@UAE_NXZ)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual class vtkSQLDatabase * __thiscall
>> vtkSQLQuery::GetDatabase(void)"
>> (?GetDatabase at vtkSQLQuery@@UAEPAVvtkSQLDatabase@@XZ)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLQuery::BindParameter(int,void
>> const *,unsigned int)" (?BindParameter at vtkSQLQuery@@UAE_NHPBXI at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLQuery::BindParameter(int,class
>> vtkVariant)" (?BindParameter at vtkSQLQuery@@UAE_NHVvtkVariant@@@Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLQuery::BindParameter(int,class
>> vtkStdString const &)"
>> (?BindParameter at vtkSQLQuery@@UAE_NHABVvtkStdString@@@Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLQuery::BindParameter(int,char
>> const *,unsigned int)" (?BindParameter at vtkSQLQuery@@UAE_NHPBDI at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLQuery::BindParameter(int,char
>> const *)" (?BindParameter at vtkSQLQuery@@UAE_NHPBD at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall
>> vtkSQLQuery::BindParameter(int,double)"
>> (?BindParameter at vtkSQLQuery@@UAE_NHN at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall
>> vtkSQLQuery::BindParameter(int,float)"
>> (?BindParameter at vtkSQLQuery@@UAE_NHM at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall
>> vtkSQLQuery::BindParameter(int,__int64)"
>> (?BindParameter at vtkSQLQuery@@UAE_NH_J at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall
>> vtkSQLQuery::BindParameter(int,unsigned __int64)"
>> (?BindParameter at vtkSQLQuery@@UAE_NH_K at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLQuery::BindParameter(int,long)"
>> (?BindParameter at vtkSQLQuery@@UAE_NHJ at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLQuery::BindParameter(int,int)"
>> (?BindParameter at vtkSQLQuery@@UAE_NHH at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall
>> vtkSQLQuery::BindParameter(int,short)"
>> (?BindParameter at vtkSQLQuery@@UAE_NHF at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall vtkSQLQuery::BindParameter(int,signed
>> char)" (?BindParameter at vtkSQLQuery@@UAE_NHC at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall
>> vtkSQLQuery::BindParameter(int,unsigned long)"
>> (?BindParameter at vtkSQLQuery@@UAE_NHK at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall
>> vtkSQLQuery::BindParameter(int,unsigned int)"
>> (?BindParameter at vtkSQLQuery@@UAE_NHI at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall
>> vtkSQLQuery::BindParameter(int,unsigned short)"
>> (?BindParameter at vtkSQLQuery@@UAE_NHG at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall
>> vtkSQLQuery::BindParameter(int,unsigned char)"
>> (?BindParameter at vtkSQLQuery@@UAE_NHE at Z)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual bool __thiscall
>> vtkSQLQuery::ClearParameterBindings(void)"
>> (?ClearParameterBindings at vtkSQLQuery@@UAE_NXZ)
>> 13>vtkQtSQLQuery.obj : error LNK2001: unresolved external symbol
>> "public: virtual class vtkStdString __thiscall
>> vtkSQLQuery::EscapeString(class vtkStdString,bool)"
>> (?EscapeString at vtkSQLQuery@@UAE?AVvtkStdString@@V2 at _N@Z)
>> _______________________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>> 
>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> ---------------------------
> Karl Merkley, Ph.D.
> 
> Elemental Technologies, Inc.
> Computational Simulation Software, LLC
> www.csimsoft.com
> 
> Office:  1-801-756-1972, ext 1
> 
> 
> 
> 
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

---------------------------
Karl Merkley, Ph.D.

Elemental Technologies, Inc.
Computational Simulation Software, LLC
www.csimsoft.com

Office:  1-801-756-1972, ext 1





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110524/0dff69b3/attachment.htm>


More information about the vtkusers mailing list