[vtkusers] VTK + Qt sqlite link error

Jeff Baumes jeff.baumes at kitware.com
Mon Jan 17 12:05:04 EST 2011


On Mon, Jan 17, 2011 at 10:59 AM, Dean Inglis <dean.inglis at camris.ca> wrote:

> Im trying to build vtk 5.7 and Qt 4.7.1 statically with VS2010 on Win 7, 32
> bit.
> Qt builds fine but I have run into the following link error:
>
> Linking CXX executable ..\..\..\..\bin\QVTKCxxTests.exe
> vtksqlite.lib(vtk_sqlite3.c.obj) : error LNK2005: _winCurrentTime already
> define
> d in QtSql.lib(sqlite3.obj)
> ..\..\..\..\bin\QVTKCxxTests.exe : fatal error LNK1169: one or more
> multiply
> def
> ined symbols found
> LINK failed. with 2
>
> Here are the two locations where this method is defined:
>
> VTK\Utilities\vtksqlite\vtk_sqlite3.c(28935):int
> winCurrentTime(vtk_sqlite3_vfs *pVfs, double *prNow){
>
> qt-4.7.1\src\3rdparty\sqlite\sqlite3.c(28987):int
> winCurrentTime(sqlite3_vfs
> *pVfs, double *prNow){
>
> there is an option for configuring the build of Qt to use sqlite from the
> operating system.  Is this what I should do?
>
>
The VTK version of sqlite is supposed to have mangled symbols with the
prefix "vtk_" so that this doesn't happen. Could you try replacing all
occurances of winCurrentTime with vtk_winCurrentTime in the VTK version and
see if it compiles correctly?

Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110117/5cd55139/attachment.htm>


More information about the vtkusers mailing list