[SOLVED]QtCreator, running application problem

  • I have some problem on lunching an application i have build. This application uses external dll. This dll are not in PATH or in the build directory. I've tried to set the run environment inside QtCreator, under project properties, but it doesn't seems to work. I want to avoid to copy the dll inside the build tree, or permanently change the PATH variable. So some know why it doesn't work??

  • Hi, it sure is possible to modify/add directories to the Path environment variable in Qt Creator (Projects, Build Settings, Build Environment, Edit PATH) so that .DLLs not in the build directory nor in the system's original PATH will be loaded for your app.

    Note that the Build settings are different for Debug and Release mode, so check that you've set the correct one (or both of them).

    Also, you can verify that the Path environment variable is really changed in your app, for example:
    qDebug() << getenv("path");

    Edit: forgot to mention, this will work when launching your app from Qt Creator but not when double-clicking on it in Windows.

  • Thanks, it seems to work! However i think that QtCreator should do it automatically, each time a library is imported, so it avoid continuous path editing.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.