[CMake] Cygwin & MinGW static and dynamic libs won't coexist

Brandon J. Van Every bvanevery at gmail.com
Wed Aug 2 21:29:36 EDT 2006


Cygwin expected nomenclature is:

cygwhatever-xxx.dll - dynamic link lib where -xxx is a version number
libwhatever.dll.a - import lib
libwhatever.a - static lib

MinGW expected nomenclature is:

libwhatever.dll - dynamic link lib
libwhatever.dll.a - import lib
libwhatever.a - static lib

I have a target "chicken-exe" which links against a dynamic library 
target "libchicken".
I have a target "chicken-static" which links against a static library 
target "libchicken-static".
The OUTPUT_NAME of chicken-exe, libchicken, and libchicken-static is 
"chicken".  Prefixes are added by CMake.  So for my problem, I expect 
there is a conflict regarding the root OUTPUT_NAME.

On Cygwin and MinGW CMake 2.4.3, if I type "make chicken-exe", it builds 
fine.  It also produces libchicken.dll.a and deletes libchicken.a.  If I 
type "make chicken-static", it builds fine.  It also produces 
libchicken.a and deletes libchicken.dll.a.  If I type "make," 
chicken-exe builds fine and chicken-static dies with an error:

Brandon J. Van Every at kahlo ~/cygwin/chicken
$ make
[ 14%] Built target libchicken-boot
[ 15%] Built target silex-boot
[ 15%] Built target easyffi-l-silex-boot
[ 17%] Built target easyffi-c-boot
[ 23%] Built target chicken-boot
Linking C static library libchicken.a
[ 37%] Built target libchicken-static
Linking C executable silex.exe
[ 37%] Built target silex
[ 37%] Built target easyffi-l-silex
[ 38%] Built target easyffi-c
Linking C shared library cygchicken.dll
Creating library file: libchicken.dll.a
[ 53%] Built target libchicken
Linking C executable chicken-exe.exe
[ 60%] Built target chicken-exe
Linking C executable chicken-profile.exe
[ 61%] Built target chicken-profile
Linking C executable chicken-setup.exe
[ 61%] Built target chicken-setup
make[2]: *** No rule to make target `libchicken.a', needed by 
`chicken-static.ex
e'.  Stop.
make[1]: *** [CMakeFiles/chicken-static.dir/all] Error 2
make: *** [all] Error 2


Cheers,
Brandon Van Every



More information about the CMake mailing list