目标平台无法创建共享库

时间:2012-07-06 06:07:05

标签: c++ gcc compilation cmake

我正在使用cmake来编译code.In,我使用了SHARED选项来创建共享库。但是,在使用cmake进行编译时,我收到了错误:

 ADD_LIBRARY for library GenericUSMModules is used with the SHARED option, but the target platform supports only STATIC libraries. Building
 it STATIC instead. This may lead to problems.

 ADD_LIBRARY for library XXXaUSMModules is used with the SHARED option, but the target platform supports only STATIC libraries. Building
 it STATIC instead. This may lead to problems.

它正在创建libGenericUSMModules.a(静态库)和libXXXUSMModules.a而不是so文件。我想知道是否可以为每个存档文件(如libGenericUSMModules.so和libXXXUSMModules.a)创建共享库,同时将其与同一位置中存在的静态库libGCVCore.a链接。 感谢

1 个答案:

答案 0 :(得分:1)

问题是我正在使用的cmake。它是一个旧版本。我安装了最新版本的Cmake和编译的代码没有任何问题。

相关问题