1

Is it possible to hide (obfuscate) symbols in a static library built with the MSVC++ toolchain? I am searching for a solution other than using an unnamed namespace or switching to a .dll. Ideally, this would be a relocatable object file, as described e.g. here (Symbol hiding in static libraries built with Xcode/gcc).

Thanks in advance!

soundhead
  • 11
  • 3
  • You can build an optimized version of static library w/o linking any symbols but remember this will make debugging your app almost impossible. You will have to debug your library in assembly level if you do so – Asesh Aug 03 '17 at 08:44
  • 1
    Thank you for your reply. The problem is: When creating and optimized (release) build, all the symbols are still visible. Do you have any idea how to obfuscate them? – soundhead Aug 03 '17 at 08:52
  • You can inform the linker not to insert any debug information in Visual C++: Go to your project properties Choose linker from the right pane Now choose debugging Now on the right pane set 'No' for "Generate Debug Info" Remember, this will make debugging almost impossible. You will have to debug in assembly level if you do so – Asesh Aug 03 '17 at 08:56
  • 1
    There is no linker involved! It is just a static library and debugging symbols can be ignored in my question's context. The symbols are visible in the .lib file and that is where I want to hide them. I would like to share this library but not make all the symbols visible in the first place. – soundhead Aug 03 '17 at 09:23

0 Answers0