Here are stl files of compounds of 3, 4, 5, and 6 cubes and the openSCAD files that produced them.
George Hart's Virtual Polyhedra site has a section on compounds of cubes. Its a good place to start a study of compound polyhedra. These four compounds and others are described. See:
The cube has 13 rotation axes - three four fold axes, four three fold axes, and 6 two fold axes. Three of the compounds use these axes for construction.
The compound of three cubes takes three overlapping cubes and rotates each in turn 45 degrees about one of the three four fold axis. The polyhedron produced is a well known one and is shown in M. C. Esher's lithograph, Waterfall.
The compound of four cubes takes four overlapping cubes and rotates each in turn 60 degrees about one of the four three fold axis. It is often called Bakos' compound after T. Bakos.
The compound of 6 cubes takes six overlapping cubes and rotates each in turn 90 degrees about a 2 fold axis.
The compound of 5 cubes places the overlapping cubes inside an imaginary dodecahedron. The dodecahedron is placed so that three of its two fold axes are aligned with the three four fold axes of the cubes. The cubes are then rotated, each in turn, by n*360/5 degrees, n taking the values 0, 1, 2, 3, and 4, around a 5 fold axis of the imaginary dodecahedron. The resultant compound has icosahedral symmetry.
A cube with holes corresponding to its 13 rotation axes is provided: axes_cube.stl. Pieces of 1.8 mm rod can be inserted in the holes to make an aid to understanding how the compounds are constructed.
All of the compound cubes need to be printed with external support. They have dangling edges but ReplicatorG seems to handle them well.
OpenSCAD has a built in cube command and a simple rotate command that makes coding these compounds trivial. For example the code for the compound of three cubes could be either
rotate(a=45, v=[1,0,0]) cube(size=35,center=true);
rotate(a=45, v=[0,1,0]) cube(size=35,center=true);
rotate(a=45, v=[0,0,1]) cube(size=35,center=true);
depending on the form of the rotate command that one uses.
Other cube compounds are described on the Virtual Polyhedra site and many are easily constructed with openSCAD.