An amidine-based fluorescent chemosensor has been prepared and is sensitive to the viscosity increase of ionic liquid formed during a specialized reaction of amidine groups with CO(2), which provides a facile and visible way to detect and sense CO(2). It has been found that the greener fluorescent chemosensor has unique sensitivity to CO(2), extraordinarily high water-resistance and no problem of carbon monoxide-interfering.