Nominate our 2022 Qt Champions!

Linker errors Qt 4.8 and VS 2010

  • Hi All,

    I'm working on upgrading a project from qt3 to qt4. The last time this app was edited the environment was Qt3 on Linux. I have eliminated all the Q4 upgrade syntax errors but I'm having some trouble building the app. I am using the Qt Creator for a dev environment since we need this to run in windows.

    When building the project, the compiler and assembler appear to finish successfully as I get the .obj files output to the appropriate directory but I then get linker errors from the first call in a file that contains my main function. I'm thinking that there is something in the environment that I am missing but I am unable to find it after several days of trying. There doesnt seem to be a pace to explicitly setup the linker environment unless I'm totally missing something... Please help!

  • Are you sure you are using Qt libraries built for MSVC2010 (and not the ones for MinGW)?
    What is the actual linker error?

  • Under build I have listed : "Qt 4.8.0 for Desktop - MSVC2010 (Qt aSDK) Debug", this indicates the Qt library as well as the build environment is that correct?

    The exact error I get is:
    LNK2019: unresolved external symbol __imp__ShellExecuteA@24 referenced in function "private:void__thiscall DigitMain::slotConverter(void)"

    I have added the path to shellapi.h to my .pro file as an INCLUDEPATH and I don't see any other way to tell the Qt Creator where to look.

Log in to reply