... So the question is I have miss something,...? How do I generate the .a file?
Yes, you miss how the linker/dynamic loaders work on linux. You have to read about it, if you want to do serious development on linux and not be bitten by strange problems.
As a start the linker doesn't need an import lib (*.lib on windows) to link to a dynamic library it can just use the info provided by the .so file.
*.a files are just archives of .o (object) files and they are meant for static libraries. Windows/Microsofts linker/tools reuse the .lib extension for two separate things and this cause lots of confusion unfortunately.