I am not having much luck getting unstuck on a zlib linking error to
unlock the goodness of SequenceStream on gz compressed files. In
short, I cannot get the right zlib symbols between seqan calling and
zlib binding: 1>------ Build started: Project: count_kmers, Configuration: Release Win32 ------ 1>count_kmers.obj : error LNK2019: unresolved external symbol _gzclose referenced in function "void __cdecl seqan::close(class seqan::Stream<struct seqan::Tag<struct seqan::GZFile_> > &)" (?close@seqan@@YAXAAV?$Stream@U?$Tag@UGZFile_@seqan@@@seqan@@@1@@Z) 1>count_kmers.obj : error LNK2019: unresolved external symbol _gzeof referenced in function "bool __cdecl seqan::streamEof(class seqan::Stream<struct seqan::Tag<struct seqan::GZFile_> > &)" (?streamEof@seqan@@YA_NAAV?$Stream@U?$Tag@UGZFile_@seqan@@@seqan@@@1@@Z) 1>count_kmers.obj : error LNK2019: unresolved external symbol _gzerror referenced in function "int __cdecl seqan::streamError(class seqan::Stream<struct seqan::Tag<struct seqan::GZFile_> > &)" (?streamError@seqan@@YAHAAV?$Stream@U?$Tag@UGZFile_@seqan@@@seqan@@@1@@Z) 1>count_kmers.obj : error LNK2019: unresolved external symbol _gzread referenced in function "unsigned int __cdecl seqan::streamReadBlock(char *,class seqan::Stream<struct seqan::Tag<struct seqan::GZFile_> > &,unsigned int)" (?streamReadBlock@seqan@@YAIPADAAV?$Stream@U?$Tag@UGZFile_@seqan@@@seqan@@@1@I@Z) 1>count_kmers.obj : error LNK2019: unresolved external symbol _gzopen referenced in function "bool __cdecl seqan::open(class seqan::Stream<struct seqan::Tag<struct seqan::GZFile_> > &,char const *,char const *)" (?open@seqan@@YA_NAAV?$Stream@U?$Tag@UGZFile_@seqan@@@seqan@@@1@PBD1@Z) 1>count_kmers.obj : error LNK2019: unresolved external symbol _gzdopen referenced in function "bool __cdecl seqan::open(class seqan::Stream<struct seqan::Tag<struct seqan::GZFile_> > &,char const *,char const *)" (?open@seqan@@YA_NAAV?$Stream@U?$Tag@UGZFile_@seqan@@@seqan@@@1@PBD1@Z) 1>D:\Build\vs10\bioinformatics\apps\Stillwater-bio\seqan\apps\count_kmers\Release\count_kmers.exe : fatal error LNK1120: 6 unresolved externals When I DUMPBIN the symbols in zlib.lib in C:\seqan-contrib-D20111031-x64\vs10\lib, the error can be explained as the above mentioned symbols are not in the library file. Instead they are the gzopen/gzeof/gzerror/gzclose variants. I went back to built zlib on my system so that I could generate very specific zlib versions, and the variety that does produce the _gz### versions is the multi-threaded DLL C++ run-time version. However, the experiment where I link directly with this version of the library STILL produces the same errors, so I now thinking that it has to do with not having the right defines to specialize the zlib API. Has anyone successfully solved this problem on Windows? Looking forward to a solution. |