I second this. A mixture of warm water, sugar, a little maple syrup and borax. I used old plastic pill bottles and scoop a little into each and set them inside and outside every spring. Rids the house of them pretty quickly.
If you time it right, at the right spot in the year, Spring, when they first emerge or are building a new colony, sugar solutions will work for carpenter ants. Usually though, Capenter ants are not attracted to sweets. There are specific carpenter ant baits that work really well. Advance Carpenter Ant Bait is the one I use.
Almost ebery thing you will buy at the store will say it wont work for carpenter ants. Also, if you can see their holes, get a puffer and Delta Dust and puff inside their nest for a quick knockdown. I only reccomend that if they are actually in your house though. If they are outside and you poison the nest, It is likely they will move and your house could become their new home.
They are attracted to wet and rotting wood. So best protection is to make sure you don't have any roof or other leaks in your house. That is the main reason I don't use wood mulch next to my house. The smell of mulch will attract them and eventually, they will find a way in.
I live next to a wooded nature preserve, so it has been a 22 year battle for me.