Staticaly linking of Zlib

RCF support and general discussion.
Post Reply
Raider
Posts: 12
Joined: Tue Mar 26, 2013 2:55 pm

Staticaly linking of Zlib

Post by Raider »

How to stacitaly link Zlib with RFC 2.0?
It was all fine with 1.3.1, but with 2.0 zlib.dll is required :(
The reason is I need to build application with single .exe file in distribution.

jarl
Posts: 238
Joined: Mon Oct 03, 2011 4:53 am
Contact:

Re: Staticaly linking of Zlib

Post by jarl »

Whoops - that's a use case we missed... I'll put some code into the next release to allow you to link zlib statically as well. Thanks for reporting this.
Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

Raider
Posts: 12
Joined: Tue Mar 26, 2013 2:55 pm

Re: Staticaly linking of Zlib

Post by Raider »

Thanks a lot. Waiting for a new version.

jarl
Posts: 238
Joined: Mon Oct 03, 2011 4:53 am
Contact:

Re: Staticaly linking of Zlib

Post by jarl »

A new release is out (2.0.0.2682)

http://www.deltavsoft.com/doc/rcf_user_ ... Notes.html

If you define RCF_ZLIB_STATIC in your build, you'll be able to compile zlib directly into your executable.
Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

Raider
Posts: 12
Joined: Tue Mar 26, 2013 2:55 pm

Re: Staticaly linking of Zlib

Post by Raider »

RCF_ZLIB_STATIC and RCF_ZLIB_STATIC=1 doesnot help :(
I'm getting "Unable to load library. Library name: zlib.dll" exception (RcfError_DllLoad) inside ZlibDll::ZlibDll(), i.e. before ZlibDll::loadFunctionPtrs() call (where RCF_ZLIB_STATIC comes into action)

jarl
Posts: 238
Joined: Mon Oct 03, 2011 4:53 am
Contact:

Re: Staticaly linking of Zlib

Post by jarl »

Sorry about that. The test harness happened to have the zlib DLL available, so I didn't notice that it was being loaded.

I've uploaded 3 files:

include/RCF/DynamicLib.hpp
src/RCF/OpenSslEncryptionFilter.cpp
src/RCF/ZlibCompression.cpp

If you copy these into your RCF distribution, it should fix the problem. The changes will be in the next build as well.
Attachments
OpenSslEncryptionFilter.cpp
(41.84 KiB) Downloaded 904 times
ZlibCompressionFilter.cpp
(20.14 KiB) Downloaded 895 times
DynamicLib.hpp
(2.64 KiB) Downloaded 939 times
Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

Raider
Posts: 12
Joined: Tue Mar 26, 2013 2:55 pm

Re: Staticaly linking of Zlib

Post by Raider »

It works! Thanks a lot!

Post Reply