[CMake] Handling library interdependencies

Mark Lohry mlohry at gmail.com
Tue Jun 16 19:23:46 EDT 2009


Correct, it fails when linking the executables with the libraries.



On Tue, Jun 16, 2009 at 6:08 PM, Tyler Roscoe <tyler at cryptio.net> wrote:

> Don't forget to cc the list! Especially since I'm not sure what else I
> can tell you.
>
> On Tue, Jun 16, 2009 at 05:24:08PM -0500, Mark Lohry wrote:
> > I added "add_dependencies( lib1 lib2 )", "add_dependencies( lib2 lib1 )",
> > and "add_dependencies( execthing lib1 lib2 )" in their appropriate
> places,
> > and changed the libraries to STATIC, but no change.
>
> Hmm.
>
> > Yes, everything compiles when i build the libraries and executables
> > separately; it fails on the link step after this, with "undefined
> reference"
> > to every library function used.
>
> What do you mean by "the link step after this"? Linking the executable
> with the libraries?
>
> > I'm unfamiliar with 'nm', can you be more specific as to what I should be
> > looking for?
>
> nm is a Unix tool for grabbing symbols out of libraries and archives.
> dumpbin is (basically) the Windows equivalent.
>
> tyler
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090616/cc79dcc1/attachment-0001.htm>


More information about the CMake mailing list