A mixture of powdered sugar and baking soda used as bait can kill carpenter ants in the short term, but it probably won't be effective long enough to permanently eradicate the colony. The best way to eliminate them is to locate the nest and destroy it.
If the nest cannot be located, it's best to use a variety of baits and traps since carpenter ants have a varied diet and are selective about their food sources. Examples include diatomaceous earth; a mixture of borax, sugar and peanut butter; and a mixture of powdered sugar and baking soda. The placement of baits and traps where ants congregate is also important. If homemade ant-control methods fail, contact a professional exterminator.