I am trying to compile c++ project on Redhat Linux 4.1.2 machine using Cmake utility.
In CMakeLists.txt i have specfied GenericUSMModules as follows.
ADD_LIBRARY(
GenericUSMModules SHARED
../../Generic/GenericUSMModules/GMUSMActState.cpp
../../Generic/GenericUSMModules/GMUSMActState.h
../../Generic/GenericUSMModules/GMUSMAdditionalOfferChecksAndEdits.cpp
../../Generic/GenericUSMModules/GMUSMAdditionalOfferChecksAndEdits.h
../../Generic/GenericUSMModules/GMUSMAlignmentOfProductsConfigurationAndStrategicOrderManagerChecksAndEdits.cpp
../../Generic/GenericUSMModules/GMUSMAlignmentOfProductsConfigurationAndStrategicOrderManagerChecksAndEdits.h
../../Generic/GenericUSMModules/GMUSMAllSitePart2SiteChecksAndEdits.cpp
)
when i run make command to compile c++ project , i got following error.
“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.”
I am not able to understand meaning of platform doesn’t support share library.
because after compilation, it generate static library(GenericUSMModules.a) not share library(GenericUSMModules.so)
please help me in this regard.
After lot of search i found that issue is due to incompatible cmake on RehHat Linux Machine.
I installed latest cmake 2.8.8 on RedHat. It solved problem and now it generates share library(.so files).