Separate Compilation

Our program is split up into two files. We partially compile the library with this command
    CC -c chemlib.cpp
This creates a file called chemlib.o, which is not human readable, and it is prohibitively expensive to reverse engineer it to discover anything close to the original C++. Only big companies can steal your work this way.

Now to make sure everything still works, we compile the test code and library together:
    CC test.cpp chemlib.o
That produces a normal a.out which we can run and test.


We deliver only the following files to the customer:
The customer writes their own program, cust.cpp that uses our product, and compile and run it happily:
    CC cust.cpp chemlib.o
    a.out

All without the customer ever being able to see how we made it work.