    int first = 0;

    // Create space to store the convex hull.
    // An alloca(), or a variable length array would be a better, but not always portable choice.
    cpVect *hullVerts = (cpVect *)calloc(vertCount, sizeof(cpVect));
    int hullCount = cpConvexHull(vertCount, verts, hullVerts, &first, 0.0);

    // hullVerts[0] will be equal to verts[first] here.
    // If you don't care, pass NULL instead of the 'first' pointer.

    cpBody *body = cpBodyNew(mass, cpMomentForPoly(mass, hullCount, hullVerts, cpvzero));
    cpShape *shape = cpPolyShapeNew(body, hullCount, hullVerts, cpvzero);

    free(hullVerts);

    // *********
    // Altenatively you can use the CP_CONVEX_HULL() macro to save yourself a little work

    // The macro will declare the hullCount and hullVerts variables.
    // hullVerts is allocated on the stack and does not need to be freed.
    CP_CONVEX_HULL(count, verts, hullCount, hullVerts)

    cpBody *body = cpBodyNew(mass, cpMomentForPoly(mass, hullCount, hullVerts, cpvzero));
    cpShape *shape = cpPolyShapeNew(body, hullCount, hullVerts, cpvzero);