What are the different platforms for Qt's configure

laurent picture laurent · Mar 6, 2011 · Viewed 9.7k times · Source

I'm trying to build Qt on Windows with the following command:

configure -static -opensource -no-webkit -no-qt3support -no-audio-backend -no-exceptions -no-opengl -no-phonon -phonon-backend

and I get this error:

Unable to detect the platform from environment. Use -platform command lineargument

However I don't know what are the different possible values for the "-platform" argument. I tried "win32" and "windows" but none of them are right. I can't find any reference that would list the possible values. Does anybody know what I need to put for Windows 7 (developing with Qt Creator)?

Answer

Johnny picture Johnny · Mar 6, 2011

Open mkspecs folder inside qt dir. There you can see multiple folders. Names of this folders are values for -platform switch.

For example, you can use win32-msvc. msvc means using MS visual studio compiler for buiding qt.