Important: Please read the Qt Code of Conduct -

MinGW vs. Cl in Nokia SDK

  • Hi,

    I hope this is the correct place for this question and that someone can help.
    I'm curious why Nokia SDK has both a Qt framework using CL (Simulator Qt for Visual Studio 2008) and one for MinGW (Simulator Qt for MinGW 4.4) on Windows host.
    I suppose some folks are familiar with CL and want to use it for Qt development, while others like gcc.
    Fair enough.

    Are there potential incompatibilities between the two? For example, a C++ program developed using CL may not compile using G++ and vice versa. Is this a common happening? Or are typical Qt programs too high level or Qt-specific enough that underlying compiler incompatibilities rarely impact a user code?

    Thanks and regards,


  • Qt works happily with both compilers.

    But: you cannot mix the object code from the one with that from the other. That means you have to stick to one of both for a single project. For the reasons see the "Name Manglig": article on wikipedia.

  • Thanks. Yes, C++ object models are different.

    Here's a scenario - I suspect I know the answer. MSVC uses declspecs for specifying things like visibility and inlining. GCC uses attributes. If your C++ code used declspecs and worked fine with MSVC, you'd have problems porting to a device that used a cross gcc. You'd have to remove the attributes.

    I'm curious if this is a common issue facing folks porting from Windows.

    Best regards, Max

  • Moderators

    Well, Qt can be compiled using g++ as well as MSVC (and a lot of other compilers, too;-). So can Qt Creator and lots of other Qt applications. So writing an application that runs using a wide range of compiler is possible.

    Of course you can not use compiler specific features for this to work. If you really need to do some platform/compiler specific code then you can always use preprocessor statements to mask those code segments from all the systems that do not understand them.

  • I have encountered certain painting differences between the two compilers. I didn't follow up with a bug report. But there are of course performance differences.
    Also some people will use non-Qt code that requires a certain compiler so they need both to be available.
    I have some Augmented Reality projects that only work in MingW (not MSVC) for example.

  • Thanks. This is very helpful!

Log in to reply