[Xapian-discuss] Windows link.exe error : libbrass.lib(brass_table.obj) : unresolved external symbol _inflateEnd

TiTi anthibug at gmail.com
Mon Aug 6 17:36:01 BST 2012


I got it working with the help of Charlie Hull (http://www.flax.co.uk/),
here is how :

I had, indeed, a zlib issue.

The following link is dead : http://www.zlib.net/zlib123-dll.zip
So you have to use one of those links :
http://sourceforge.net/projects/libpng/files/zlib/1.2.3/zlib123-dll.zip/download
http://sourceforge.net/projects/gnuwin32/files/zlib/1.2.3/zlib-1.2.3-bin.zip/download
I saw only one *more recent* version of this package :
http://sourceforge.net/projects/libpng/files/zlib/1.2.5/zlib125-dll.zip/download
Compilation and linking also works (but more warning), didn't try it yet.
(Note: zlib is currently in 1.2.7 ...)

Do *NOT* use this (linking will fail) :
Download sources & prebuilt dll here :
http://www.winimage.com/zLibDll/index.html
Rename : zlibstat.lib to zlib.lib

Do *NOT* use this (linking  will fail)  :
Get sources from http://zlib.net/
-> Then go to zlib-1.2.7\contrib\vstudio\vc10\zlibvc.sln
Release compile then go to output dir and rename zlibwapi.lib to zlib.lib


Pretty basic sutff I guess, but I'm not zlib expert and without the good
link .... I've end up lost with others links...


# At last, I had a manifest error I got rid of by switching to VS2008 :

-> Used "C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" rather than 10.0.
But I suppose it's probably nothing to get it working with VS2010
compilation & link are passing successfully.

Cheers++

On Mon, Aug 6, 2012 at 5:05 PM, TiTi <anthibug at gmail.com> wrote:

> Hi guys,
>
> I discovered xapian today and I'm trying it because it looks promising
> compared to other FTS engines.
> However I'm in a windows environment so it's a bit painful to set up as
> there is no official binaries.
>
> I've heard about http://www.flax.co.uk/xapian_binaries
> And I'm trying to build their latest release (1.2.8).
>
> After a few tries I manage to compile everything with visual 2010.
> However the linking is failing :
>
>
> //------------------------------------------------------------------------------
>
> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> cl.exe -showIncludes -nologo -c -Zi -I.. -I..\include -I..\common
> -I..\win32 -W3 -EHsc -DWIN32 -D__WIN32__ -D_WIN32
> -D_WINDOWS -D "HAVE_VSNPRINTF" -D "HAVE_STRDUP" -D "_USE_32BIT_TIME_T"
> -D_CRT_SECURE_NO_DEPRECATE -I"C:\Users\qwerty\Deskt
> op\xapian-1.2.8\zlib-1.2.7" -O2 -MD -D NDEBUG /I ".." /I "..\testsuite"
> /I"..\backends\flint" /I"..\backends\chert" /I"..\
> backends\brass" /Fo".\\" /Fd".\\" /Tp ".\xapian-compact.cc"
> ".\xapian-chert-update.cc" ".\xapian-progsrv.cc" ".\xapian-tcp
> srv.cc" ".\xapian-inspect.cc" ".\xapian-check-chert.cc"
> ".\xapian-check-brass.cc" ".\xapian-check-flint.cc" ".\xapian-ch
> eck.cc" ".\xapian-replicate.cc" ".\xapian-replicate-server.cc" >>deps.d
> if exist "..\win32\xapdep.exe" ..\win32\xapdep.exe
> nmake / CFG="" DEBUG=""
>
> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> link.exe @C:\Users\qwerty\AppData\Local\Temp\nmD882.tmp
> libbrass.lib(brass_table.obj) : error LNK2019: unresolved external symbol
> _inflateEnd referenced in function "public: __thisc
> all BrassTable::~BrassTable(void)" (??1BrassTable@@QAE at XZ)
> libchert.lib(chert_table.obj) : error LNK2001: unresolved external symbol
> _inflateEnd
> libflint.lib(flint_table.obj) : error LNK2001: unresolved external symbol
> _inflateEnd
> libbrass.lib(brass_table.obj) : error LNK2019: unresolved external symbol
> _deflateEnd referenced in function "public: __thisc
> all BrassTable::~BrassTable(void)" (??1BrassTable@@QAE at XZ)
> libchert.lib(chert_table.obj) : error LNK2001: unresolved external symbol
> _deflateEnd
> libflint.lib(flint_table.obj) : error LNK2001: unresolved external symbol
> _deflateEnd
> libbrass.lib(brass_table.obj) : error LNK2019: unresolved external symbol
> _deflateInit2_ referenced in function "protected: v
> oid __thiscall BrassTable::lazy_alloc_deflate_zstream(void)const "
> (?lazy_alloc_deflate_zstream at BrassTable@@IBEXXZ)
> libchert.lib(chert_table.obj) : error LNK2001: unresolved external symbol
> _deflateInit2_
> libflint.lib(flint_table.obj) : error LNK2001: unresolved external symbol
> _deflateInit2_
> libbrass.lib(brass_table.obj) : error LNK2019: unresolved external symbol
> _deflateReset referenced in function "protected: vo
> id __thiscall BrassTable::lazy_alloc_deflate_zstream(void)const "
> (?lazy_alloc_deflate_zstream at BrassTable@@IBEXXZ)
> libchert.lib(chert_table.obj) : error LNK2001: unresolved external symbol
> _deflateReset
> libflint.lib(flint_table.obj) : error LNK2001: unresolved external symbol
> _deflateReset
> libbrass.lib(brass_table.obj) : error LNK2019: unresolved external symbol
> _inflateInit2_ referenced in function "protected: v
> oid __thiscall BrassTable::lazy_alloc_inflate_zstream(void)const "
> (?lazy_alloc_inflate_zstream at BrassTable@@IBEXXZ)
> libchert.lib(chert_table.obj) : error LNK2001: unresolved external symbol
> _inflateInit2_
> libflint.lib(flint_table.obj) : error LNK2001: unresolved external symbol
> _inflateInit2_
> libbrass.lib(brass_table.obj) : error LNK2019: unresolved external symbol
> _inflateReset referenced in function "protected: vo
> id __thiscall BrassTable::lazy_alloc_inflate_zstream(void)const "
> (?lazy_alloc_inflate_zstream at BrassTable@@IBEXXZ)
> libchert.lib(chert_table.obj) : error LNK2001: unresolved external symbol
> _inflateReset
> libflint.lib(flint_table.obj) : error LNK2001: unresolved external symbol
> _inflateReset
> libbrass.lib(brass_table.obj) : error LNK2019: unresolved external symbol
> _deflate referenced in function "public: void __thi
> scall BrassTable::add(class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> > const &,class s
> td::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> >,bool)" (?add at BrassTable@@QAEXABV?$basic_stri
> ng at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@V23 at _N@Z)
> libchert.lib(chert_table.obj) : error LNK2001: unresolved external symbol
> _deflate
> libflint.lib(flint_table.obj) : error LNK2001: unresolved external symbol
> _deflate
> libbrass.lib(brass_table.obj) : error LNK2019: unresolved external symbol
> _inflate referenced in function "public: bool __thi
> scall BrassTable::read_tag(class Brass::Cursor *,class
> std::basic_string<char,struct std::char_traits<char>,class std::alloca
> tor<char> > *,bool)const " (?read_tag at BrassTable@@QBE_NPAVCursor at Brass
> @@PAV?$basic_string at DU?$char_traits at D@std@@V?$allocator
> @D at 2@@std@@_N at Z)
> libchert.lib(chert_table.obj) : error LNK2001: unresolved external symbol
> _inflate
> libflint.lib(flint_table.obj) : error LNK2001: unresolved external symbol
> _inflate
> ..\win32\Release\xapian-compact.exe : fatal error LNK1120: 8 unresolved
> externals
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
> Studio 10.0\VC\BIN\link.exe"' : return code '0x460'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
> Studio 10.0\VC\BIN\nmake.EXE"' : return code '0x2'
> Stop.
>
> //------------------------------------------------------------------------------
>
>
> I've tried with visual 2008 : same result.
>
> I do have zdll.lib and the path is good.
> I've tried with zlib 1.2.7 and zlib 1.2.5 : same result.
>
> Looks like there's a lib issue with zlib ("inflateEnd" is related to zlib,
> right?), but I'm not sure what to do.
>
> Could you guys give me an advice ?
>
> Thx!
>


More information about the Xapian-discuss mailing list