A gearbox and a method for additively manufacturing the gearbox are provided. The gearbox includes a housing having an integral heat exchanger additively manufactured within the housing. The heat exchanger includes a plurality of heat exchange passageways for transferring heat between two or more fluids. The heat exchanger is defined at any suitable location or locations within the housing, for example, within voids defined between the walls of the housing and components housed within housing, such as driveshafts, gears, bearings, etc.