Skip to main content
hofo
Associate II
April 16, 2019
Solved

STN32CubeMX X-CUBE-AI.3.4.0 - arm-none-eabi-gcc: cannot find -lnetwork_runtime.a

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

This topic has been closed for replies.
hofo
hofoBest answer
Associate II
April 16, 2019

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.

1 reply

hofo
hofoAuthorBest answer
Associate II
April 16, 2019

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.