I try to upgrade to Houdini 16.5 and libHAPI.a is missing in the install folder.

For native applications, you will need to link against the import library. The import library is name libHAPI.a and is found in a directory that should look similar to:

C:\Program Files\Side Effects Software\Houdini <version>\custom\houdini\dsolib
Is there something that has changed?