The code where Arduino communicates with Pixhawk does not compile

Did you install the complete library or did you just copy the .h file? If the latter, where did you place the .h file?

Which error?