Important: Please read the Qt Code of Conduct -

QtCreator 2.2.1 don't load DLLs

  • I am using QtCreator on Windows, and since I have switched from 2.0.1 to the 2.2.1 I have to setup my own libraries' path to the executable path.

    I have a subdir project structure, and in each library .pro file I have

    In the main project, for each library I have
    LIBS += -L$$MY_LIB_DIR -l$${MY_LIB_NAME}
    LIBS += -$$MY_LIB_DIR/lib -l$${MY_LIB_NAME}

    before I was able to launch the executable from QtCreator whatever was the value of MY_LIB_DIR (of course outside of QtCreator it need to be on the path), but now it just doesn't launch. I need to set MY_LIB_DIR to the executable directory.

  • Moderators

    Is MY_LIB_DIR in your PATH? IIRC Windows checks the PATH for libraries to load.

  • "You do.":

    bq. Windows then searches for the DLLs in the following sequence:

    • The directory where the executable module for the current process is located.
    • The current directory.
    • The Windows system directory. The GetSystemDirectory function retrieves the path of this directory.
    • The Windows directory. The GetWindowsDirectory function retrieves the path of this directory.
    • The directories listed in the PATH environment variable.

Log in to reply