VS10 Problems with building Wt with ZLIB
Added by Radosław Szymański over 12 years ago
Hello,
I finally built Wt but there are some problems with it. I chose only ZLIB and SSL as extra features, but first, the generated wthttp project is missing zlib/include causing error - missing zlib.h file. After adding it, it builds, but all projects that use wthttp.lib, can't compile generating these errors:
wthttp.lib(Reply.obj) : error LNK2019: unresolved external symbol deflateInit2 referenced in function "private: void __thiscall http::server::Reply::initGzip(void)" (?initGzip
Reply@server@http@
AAEXXZ)
wthttp.lib(Reply.obj) : error LNK2019: unresolved external symbol _deflateEnd referenced in function "private: void __thiscall http::server::Reply::encodeNextContentBuffer(class std::vector<class boost::asio::const_buffer,class std::allocator > &,int &,int &)" (?encodeNextContentBufferReply@server@http@
AAEXAAV?$vectorVconst\_buffer@asio@boost@
V?$allocatorVconst\_buffer@asio@boost@@
std@
std`AAH1
Z)
wthttp.lib(Reply.obj) : error LNK2019: unresolved external symbol _deflate referenced in function "private: void __thiscall http::server::Reply::encodeNextContentBuffer(class std::vector > &,int &,int &)" (?encodeNextContentBufferReply
server@http@AAEXAAV?$vector
Vconst_buffer@asio@boost@V?$allocator
Vconst_buffer@asio@boost@@std
@std
@AAH1`Z)
Also there's Z_LIB in cmake, what it's for? Is it related with ZLIB? And if that matters, I use zlib 1.2.7.
Oh and another error I got when trying to compile widgetgallery.wt:
LINK : fatal error LNK1181: cannot open input file 'wtext.lib'
Which project should generate wtext.lib? Because none did it.
Replies (5)
RE: VS10 Problems with building Wt with ZLIB - Added by Wim Dumon over 12 years ago
Did you follow the instructions at this link: http://redmine.emweb.be/projects/wt/wiki/Installing_Wt_on_MS_Windows ?
Best thing to do now is to erase your build directory completely and start over following the procedure described above.
Wim.
RE: VS10 Problems with building Wt with ZLIB - Added by Radosław Szymański over 12 years ago
Yes, I followed these instructions, all works fine except WTHTTP_WITH_ZLIB.
RE: VS10 Problems with building Wt with ZLIB - Added by Wim Dumon over 12 years ago
Do you get this error while compiling the Wt examples or your own application? Is zlib.lib (or whatever its name is) added to the link libraries in your project's properties?
BR,
Wim.
RE: VS10 Problems with building Wt with ZLIB - Added by Radosław Szymański over 12 years ago
zlibstat.lib is used only by wthttp project which generates wthttp.lib. And I'm getting that error when I'm trying to compile anything that needs linking with wthttp.lib (that was compiled with WTHTTP_WITH_ZLIB definition).
RE: VS10 Problems with building Wt with ZLIB - Added by Wim Dumon over 12 years ago
Hello,
That is normal if wthttp.lib is a static lib (on windows we build static libs by default). So in your project, you'll also have to add zlibstat.lib as a library to link to.
BR,
Wim.