Skip to main content
dongil.park
Associate
February 25, 2019
Solved

How to add external .c library

  • February 25, 2019
  • 1 reply
  • 845 views

Hello,

for Maintenance purpose, I made a .c library folder outside of SPC5Studio project

so I just linked the library folder under source folder

but my library didn't compiled

How can i add external library file into project?

Thank you

    This topic has been closed for replies.
    Best answer by Erwan YVIN

    Hello Dongil ,

    you can add your library in user.mak

    # List of all user C source files
    U_C_SRC = ./main.c
     
    # List of all user C++ source files
    U_CPP_SRC =
     
    # List of all user ASM source files
    U_ASM_SRC =
     
    # List all user C define here, like -D_DEBUG=1
    UDEFS =
     
    # Define ASM defines here
    UADEFS =
     
    # List all user directories here
    UINCDIR =
     
    # List the user directory to look for the libraries here
    ULIBDIR =
     
    # List all user libraries here
    ULIBS =

    Best regards

    Erwan

    1 reply

    Erwan YVIN
    Erwan YVINBest answer
    ST Employee
    February 27, 2019

    Hello Dongil ,

    you can add your library in user.mak

    # List of all user C source files
    U_C_SRC = ./main.c
     
    # List of all user C++ source files
    U_CPP_SRC =
     
    # List of all user ASM source files
    U_ASM_SRC =
     
    # List all user C define here, like -D_DEBUG=1
    UDEFS =
     
    # Define ASM defines here
    UADEFS =
     
    # List all user directories here
    UINCDIR =
     
    # List the user directory to look for the libraries here
    ULIBDIR =
     
    # List all user libraries here
    ULIBS =

    Best regards

    Erwan