How to use c library as a thirdparty?

hi
i find the engine self use some c library, such as libPng, freetype, a build.cs file is used to build the c library to engine .
while i want to use a c library for my game, but i use the full source code , not the header & lib which the engine used. and i got some link error, output shows the c function i used is undefined, but i use the full souce code , tbe function is definde in .c file. can you give me some suggestions