Canonical duality for solving general nonconvex constrained problems