In this paper we analyze the Fritz John and Karush--Kuhn--Tucker (KKT) conditions for a (Gâteaux) differentiable nonconvex optimization problem with inequality constraints and a geometric constraint set. The Fritz John condition is characterized in terms of an alternative theorem which covers beyond standard situations, while characterizations of KKT conditions, without assuming constraints qualifications, are related to strong duality of a suitable linear approximation of the given problem and the properties of its associated image mapping. Such characterizations are suitable for dealing with some problems in structural optimization, where most of the known constraint qualifications fail. In particular, several examples are given showing the usefulness and optimality, in a certain sense, of our results, which provide much more information than those (including the Mordukhovich normal cone or Clarke's) appearing elsewhere. The case with a single inequality constraint is discussed in detail by establishing a hidden convexity in the validity of the KKT conditions. We outline possible applications to a class of mathematical programs with equilibrium constraints as well as to vector equilibrium or quasi-variational inequality problems. [ABSTRACT FROM AUTHOR]