I noticed with my compilation that if I don't put the "-platform" option , the pkg-config thing comes out.

I am also cross compiling, putting the -platform and -xplatform together solve that pkg-config thing.