You no longer need dlib for facial landmark detection, since OpenCV has its own interface, right here
Secondly, once you have the landmarks, they should be stored in a vector<Point>. On top of that you can call the convexHull function to find a surrounding contour of the keypoints.
Thirdly, on that convexHull you either apply boundingRect or minAreaRect to get a upright or rotated bounding rectangle.