2019-04-16 02:38 AM
Hello community,
I created a Makefile with CubeMX and the X-CUBE-AI software. When I try to compile the project with arm-none-eabi-gcc the linker cannot find network_runtime.a.
/usr/lib/gcc/arm-none-eabi/5.4.1/../../../arm-none-eabi/bin/ld: cannot find -lnetwork_runtime.a
collect2: error: ld returned 1 exit status
The file network_runtime.a is in the folder Middlewares\ST\AI\AI\lib and the option -L/mnt/DiscoveryBoard/Middlewares/ST/AI/AI/lib/ (absolute path.., I also tried others...) is defined.
Maybe somebody knows what I'm missing.
Thank you very much.
Oliver
Solved! Go to Solution.
2019-04-16 07:11 AM
I found a solution:
The Makefile hast to be modified from:
# libraries
LIBS = -lc -lm -lnosys \
-lnetwork_runtime.a
to
# libraries
LIBS = -lc -lm -lnosys \
-l:network_runtime.a
The -l argument expects the filename of specified library to be in a specific format. Namely, -lnetwork_runtime tells the linker to look for a file named
libnetwork_runtime.a. Since the provided library doesn't have the lib prefix the colon has to be used.
2019-04-16 07:11 AM
I found a solution:
The Makefile hast to be modified from:
# libraries
LIBS = -lc -lm -lnosys \
-lnetwork_runtime.a
to
# libraries
LIBS = -lc -lm -lnosys \
-l:network_runtime.a
The -l argument expects the filename of specified library to be in a specific format. Namely, -lnetwork_runtime tells the linker to look for a file named
libnetwork_runtime.a. Since the provided library doesn't have the lib prefix the colon has to be used.