1

I am writing a C++ static library with Visual C++ 2008 and will sell it to developers. I find it is necessary to provide two versions for the static library, that is, release version and debug version, so that the developers can compiled their corresponding project with the static library.

However, for the debug version of the static library, will it disclose some of the information of the source codes? Of course, I do not want this to happen.

durron597
  • 31,968
  • 17
  • 99
  • 158
alancc
  • 487
  • 2
  • 24
  • 68
  • 5
    "Of course, I do not want this happens." Shame on you! –  Mar 10 '14 at 18:23
  • You need to be more specific about what you mean by 'debug' and 'release' to get a real answer. Are you (only) talking about the version of the run-time library used? – user786653 Mar 10 '14 at 18:44
  • Why you need to provide a debug version if you are not planning to give the source code !!!!!! – Mahmoud Fayez Mar 10 '14 at 19:24
  • Object code can always be reverse-engineered with sufficient time and energy. If you have reasons to be concerned about it then you just didn't create enough of it. – Hans Passant Mar 10 '14 at 21:09

1 Answers1

0

The source codes information will not be disclosed by the debug version, however for someone who really wants to reverse engineer your code, it will make it easier. See here: Decompile C code with debug info?

On the other hand, not providing a debug version will not make it much harder for someone who's really determined, so you may as well stop worrying about it.

You can make your libraries open source and still sell commercial licences. The accessibility of your source code is somewhat irrelevant to making profit from it.

Community
  • 1
  • 1
jaho
  • 4,852
  • 6
  • 40
  • 66