[CMake] Cannot determine link language for target

William A. Hoffman billlist at nycap.rr.com
Fri Jul 28 11:44:27 EDT 2006


At 11:36 AM 7/28/2006, Marc-André Laverdière wrote:
>Hello CMakers,
>
>I'm really a n00b...
>
>So, I am building each subdirectory into a static library and I want to put all those libraries into a nice big dynamic library. The big dynamic library is the objective here.
>
>I'm doing it as such:
>ADD_LIBRARY(XYZ SHARED
>${CMAKE_CURRENT_SOURCE_DIR}/stdio/libstdio.a
>${CMAKE_CURRENT_SOURCE_DIR}/stdlib/libstdlib.a
>${CMAKE_CURRENT_SOURCE_DIR}/string/libstring.a
>${CMAKE_CURRENT_SOURCE_DIR}/time/libtime.a
>${CMAKE_CURRENT_SOURCE_DIR}/wchar/libwchar.a)
>
>Yet, I obtain the following, when I run rebuild_cache:
>CMake Error: Cannot determine link language for target XYZ
>
>What am I doing wrong? How should I proceed to build that dynamic library?
>
>Thanks in advance for the patience and the support!

You can not create a shared library by just adding a bunch of .a libraries.
You need source files.   CMake is trying to compile the .a files which it
of course does not know how to do.  What exactly are you trying to do?


-Bill



More information about the CMake mailing list