cancel
Showing results for 
Search instead for 
Did you mean: 

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

hofo
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
hofo
Associate II

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.

View solution in original post

1 REPLY 1
hofo
Associate II

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.