There are two main techniques used to stick gingerbread pieces together, one using royal icing, the other using caramel. I use the caramel method because it is faster, but it’s not as effective when the weather is hot as the caramel tends to melt.
To make the caramel, put the 200g caster sugar and the 180ml water into a medium pan and bring to the boil over a medium heat (give the pan a shake every so often rather than stirring). Reduce the heat to low and simmer until thickened and light brown, about 10 minutes. Remove from the heat and use immediately. If it starts to harden during the process of building, gently warm it up again in the pan.