cURL / Mailing Lists / curl-library / Single Mail


Re: Linking curllib to other library

From: Gisle Vanem <>
Date: Tue, 15 Mar 2011 21:36:45 +0100

"Krzysztof Fediuk" <> wrote:

> mlib project is supposed to be a common part of all apps and because of
> that i've set this project as a static library. I've added all necessary
> paths and libcurl_static.lib file to be linked. This project compiles fine.


> In the second project i've added mlib as a reference and when building
> this project i get unresolved external symbol linker error on every curl
> function.
> I'm not so experienced in C++, but i thought that after making mlib
> file everything should be included there, so I can only depend on this
> particular file?

You cannot unless mlib uses libcurl dynamically. If mlib is a static lib, then
the final linking stage must also include libcurl_static.lib (normally added after
mlib.lib). Also read Section 5.7.

List admin:
Received on 2011-03-15