On Mon, Dec 14, 2015 at 9:34 AM, Tom Kacvinsky
<tom.kacvin...@vectorcast.com> wrote:
> I am getting link errors because cmake is adding transitive
> dependencies.  I am building a DLL which depends on a static archive
> (and is marked as such with add_dependencies), but when I link an
> executable that depends on the DLL, both libraries (import library for
> the DLL and static archive) are specified on the link. leading to
> duplicate symbol errors as the symbol are exported form the DLL and
> defined in the static archive.
>
> How do I work around this?  This is the one thing that has frustrated
> me over the last couple of years - I have never received an answer
> telling me how to turn off transitive dependencies.

More details:

Windows 7, 64 bit, cmake 2.8.12.11 from cmake.org website.  DLL built
with gnatdll, import library built with MSVC's lib utility, static
library built with the MSVC tool chain.

I'll try to come up with a simple reproducer.  I hope to do this
completely with the MSVC tool chain as I don't expect people to jump
through the hoops of configuring cmake to use an Ada tool chain.
Unless Alan Irwin chimes in, that is.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to