0

Is it possible to create a LIB file which doesn't expose some of its functions to the public?

I mean, I can open any lib file and see every single function of it, not just the "public APIs". Also if I quickly make a prototype for it manually, then I can even call it.

I've got no special intentions with it, I'm just interested if it's possible.

original.roland
  • 640
  • 5
  • 17
  • Declare functions `static` and they can't be accessed from another file. – Barmar Feb 20 '17 at 12:02
  • you can use an Anonymous Namespace. see this [question](http://stackoverflow.com/questions/154469/unnamed-anonymous-namespaces-vs-static-functions) for more details. – m_dunaevski Feb 20 '17 at 19:29
  • Refer to http://stackoverflow.com/questions/15560892/symbol-visibility-and-namespace – CPP Feb 21 '17 at 05:35

0 Answers0