The invention discloses an automatic generation method and
system for an intelligent
adaptation layer based on API change. The method comprises the steps that API
change detection is conducted according to new and old version API interface definitions,
adaptation codes are generated according to an API
change detection result and compiled into a compatible
adaptation layer
library, and the compatible adaptation layer
library is packaged into an installation
package; in the installation stage, the new version target
library and the compatible adaptation layer library are installed in a target
directory; and loading the compatible adaptation layer library prior to the new-version target library in the running stage, taking over and
processing the old-version API interface through the compatible adaptation layer library, and transferring the new-version API interface in the new-version target library. The invention aims to solve the compatibility problem caused by the API change of the
software library, realize the automatic generation of the intelligent adaptation layer to ensure the seamless compatibility of the application program with different version libraries under the RPM and other
software package management systems, and reduce the maintenance
workload for solving the incompatibility problem caused by the API change.