Fix driver code and wrapper generation to support resolutions and library creation