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

Libray File in C51?

Hi!
I'd like to hide a code snippet in a large program I'm supplying to a customer. Normally, I compile the code snippet to a library file and invoke it from the main file, but how can I hide the snippet in the C51 compiler? I don't want to change compiler at this late stage. Any suggestions or workarounds?

Thanx in advance...

  • I'd like to hide a code snippet in a large program I'm supplying to a customer.
    sounds dishonest

    Normally, I compile the code snippet to a library file and invoke it from the main file, but how can I hide the snippet in the C51 compiler?
    this sounds like you even want to hide its existence from the one who paid for it, is that it?

    Erik

  • You can use libraries to ship functionality without shipping source code.

    This is, however, normally a very bad idea. It is a good way to break functionality when the compilation tools changes file format or calling conventions.

    Many companies have explicit requirements that source code they buy must have full source code with the only exception the standard runtime library - functions that they will get access to from a different compiler vendor if they switch tools. And functions that can often be replaced with own copies based on generally available source code on the net.

    The big issues here:
    - is there a backdoor or similar you want to hide?
    - or do you have source code that you for some reason don't want the customer to have access to, even if the customer does know about the functionality the code brings?

    Any agreement should up-front have explained what you can, and can not, deliver. If you did claim that you would deliver source code for a program then you should ship all source code unless you specifically did agree that a specific functionallity would only be shipped in binary form.

  • Study the documentation about creating & using libraries with the C51 tools.