Fix various errors in setup.py
Fix compile error in cpp