This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to not include uncalled functions in library?

I have create a .lib file that contains my functions.But sometimes i only need to call some of these functions, but when i add the lib file into my projects, it always says there are uncalled functions, how could i get rid of this?

Parents
  • Libraries that contain multiple objects can almost always resolve linkage at that level, some compilers permit an object/section per function. If you have a library created out of one monolithic source file then the linker isn't going to be able to perform dead code elimination. Suggest you break your library source into a one-file-per-function model.

Reply
  • Libraries that contain multiple objects can almost always resolve linkage at that level, some compilers permit an object/section per function. If you have a library created out of one monolithic source file then the linker isn't going to be able to perform dead code elimination. Suggest you break your library source into a one-file-per-function model.

Children