I have a library and some head files, no c++ source code, I want to use it with python.
I tried py++, but gccxml report error.
I tried swig, but some many "undefined symbol" errors.
Are there some smart tools can do such things automatically?
This approach requires a bit a bit of work, and might not be feasible if you have a lot of functions, that you want to wrap/the functions use a lot of c++ intrinsic types as arguments/return values. 
If that is not the case, you can define some c-wrapper functions, with the "extern c" keyword in front of them, with pure c arguments and return types. Compile and link the "wrapper functions" to your c++ library. Then you can use the ctypes module (from python) to call your wrapper functions, which then in turn call the c++ functions in your library.
How to wrap a c++ library for python?