Cross-Compilation Sample Program
- Go to the ${MX_SDK_HOME}/samples/mxManufacture/C++ directory.
cd ${MX_SDK_HOME}/samples/mxManufacture/C++Modify the CMakeLists.txt file in the current directory and add the CANN link library path to link_directories.
MX_SDK_HOME indicates the SDK installation directory. Replace it with the actual directory.
- Modify the run.sh file in the current directory, add the cross compilation tool before cmake, and comment out the following statement, as shown in the following figure.

- Run the script to perform cross compilation. If the main executable program is generated, the compilation is successful.
bash run.sh

Parent topic: Cross Compilation Description