Semidefinite programming (SDP) approach has been widely used to convert nonconvex problems into convex ones in recent years. In this paper, we apply the SDP approach to cooperative localization where the inter-target communication capability is exploited for the purpose of coverage extension and accuracy enhancement. Cooperative Time-of-Arrival (ToA) minimax SDP and Received Signal Strength (RSS) minimax SDP algorithms are proposed. Simulations show that the cooperative localization with SDP can achieve satisfying performance with considerably reduced complexity. In addition, we propose a virtual anchor concept to further improve the localization accuracy, especially in the outside-of-the-convex-hull situations.