user197967
user197967

Reputation:

c++ and zlib static library

I am making a c++ (windows devc++) application which downloads a file using libcurl. I have included the libcurl source code and library to mu executable, so no external dll is required. libcurl requires zlib. But I cannot find out how to include it in the executable. As a result zlib1.dll has to be present. Does anybody know how to include this as well? Thanks in advance!

Upvotes: 6

Views: 16521

Answers (1)

LiraNuna
LiraNuna

Reputation: 67232

You have two options.

You said you're using Dev-C++ which compiles using GCC. zlib has a static library option Makefile, just use make libz.a and it will produce the static library you desire.

Another option would be to include the zlib source code directly into your application - that means just take the zlib sources and put them inside a dedicated directory in your application's source and set DevC++ to compile it.

Upvotes: 7

Related Questions