As for C compiler (gcc), first make sure you do not make a mistake of compiling it with
-g option (adds symbols for debugging, basically whole source code).
-g Produce debugging information in the operating system's native format
Secondly, try with
-s Remove all symbol table and relocation information from the executable.
Without function names is would be harder to reverse engineer it. Take a look at
man strip. I haven't tried it, but something like
strip --strip-debug objfile
strip --strip-unneeded objfile
on your object files could be useful.
Turn on as much optimisation as you can
-O3. It is really hard to read an optimized assembly, making it another impediment. There is really no good way of preventing disassembly and reverse-engineering, but it makes it harder.
As for Python, it is absolutely OK to ship only
.pyc bytecode files. It is compiled version of source code for Python Virtual Machine. How do I create a .pyc file?. Try this one, maybe it is what you need. User can run bytecode file using
python just as easily as a source code file.
Lastly, try to google for code obfuscation. It makes no sense to obfuscate C++ code, but maybe someone knows if code obfuscation is a good strategy for Python.