cancel
Showing results for 
Search instead for 
Did you mean: 

Linking external object files

alessandro2
Associate III
Posted on October 31, 2016 at 10:05

Hello,

I have some closed-source library code, which I need to use in my project.

If I just add the headers and the .o files to my project, when I build, I get the linker error ''undefined reference to xxx ...''. I need a way to tell the linker where to find the object files. I can't find the usual eclipse setting allowing to do so.

Does anyone know how to do this?

Thank you in advance.

#object #.o #linking
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 REPLY 1
Erwan YVIN
ST Employee
Posted on November 07, 2016 at 11:53

Hello Alem ,

you should update user.mak and place in the project your .o files in a user directory in your eclipse project.

# List all user directories here
UINCDIR = -Itest
# List the user directory to look for the libraries here
ULIBDIR =
# List all user libraries here
ULIBS = test.o

Do not put in components directory Best regards Erwan