including printf-stdarg.c in Mplab X project

Hello, This is almost a C/Mplab question but I’m hoping that someone has solved this before. I have some random behaviors when using printf with freeRTOS, so I’m trying to use printf/ sprintf functions in my project but I have an error saying that printf/sprintf is already defined in libc.a I didn’t include libc.a library in my project and I started from a demo project. How can I use printf-stdarg.c rather than libc.a ?

including printf-stdarg.c in Mplab X project

This is what google gave me as a first suggestion https://sourceware.org/binutils/docs-2.22/ld/Options.html#index-gt002d002dallow002dmultiple_002ddefinition-190