Question: In my alternate history (1800s), I have troop hiking through tropical sub-Saharan Africa. For plot reasons, I have man-killing mosquitos, but I also have a plant that exudes CO2 and other attractants. These flowering plants are placed in the room at night to attract the mosquitos away from people. 

Evolution-wise, however, 'consuming' CO2 and giving off O2 is so deeply ingrained in a plant's DNA, it is hardly believable to be the other way around.

I'd easily hand-wave it away as some special scent, but the CO2 is critical to the plot. **Can a plant evolve to give off CO2?** Or rather, how difficult would that be to explain.

Answer: 
Plants give off CO2 at night, when they start to respirate using the 'fuel' (glucose) synthesised by photosynthesis in the day. Check out the [Calvin-Benson cycle](https://en.wikipedia.org/wiki/Light-independent_reactions#Coupling_to_other_metabolic_pathways)
You might also look into *photorespiration*, an error in photosynthesis which causes a plant to produce CO2 instead of O2. This only occurs when CO2 supply to the plants is low, which might happen when the stomata are closed to prevent water loss. Research suggests that photorespiration might have to do with nitrogen assimilation as well, meaning a plant in a nitrogen-poor environment might be more likely to photorespire.