The invention belongs to the technical field of freight rate search, and provides a method,
system and device for adapting freight rate search codes to a multi-
system architecture, and the method comprises the steps: compiling a
shell script, and obtaining an operation type of a current execution environment and a CPU
hardware architecture type by calling the compiled shell; the method comprises the following steps: compiling compatible CMakeLists.txt files for operating systems of different types and different versions, and matching an
operating system environment through the compatible CMakeLists.txt files; by storing a plurality of versions of the same shared
library and setting names referencing the shared
library, the shared libraries of operating systems of different versions are compatible; judging a CPU
hardware architecture type through a predefined judgment
macro, and accessing a register according to the CPU
hardware architecture type; by setting compiling options for compiling marks, the value ranges of character type variables of different CPU hardware architectures are unified. According to the method, the same set of codes can be adapted to different
software and hardware architectures, the development efficiency is remarkably improved, the development time is shortened, and the input cost of testing and development personnel is reduced while the function quality is guaranteed.