Skip to main content
alessandro2
Associate III
October 31, 2016
Question

Linking external object files

  • October 31, 2016
  • 1 reply
  • 696 views
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 topic has been closed for replies.

    1 reply

    Erwan YVIN
    ST Employee
    November 7, 2016
    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