I am not privy to your software choices or how their makefiles--or whatever vendor foo calls them--work.
Your IDE should let you remove but not delete function implementations that you are not using from the project and just rebuild.