4
votes

I'm trying to find an equivalent feature in Qt Creator that I currently know how to do in Visual Studio.

In Visual Studio I'm able to modify the PATH environment in the Property Pages-> Configuration Properties-> Debugging-> Environment and I can set something like:

PATH=%PATH%;%MYENVIRONMENTVAR%

Where MYENVIRONMENTVAR points to a directory (lets call it C:\MYIMPORTANTDLLS) containing dlls needed for my program to run.

I'm looking for the equivalent of this in Qt Creator. In Qt Creator I thought I would accomplish this in Projects-> Select the Run tab-> Expand the Build Environment Details and modify the Path there. But I can't append an environment variable to the end of the PATH in that location. Instead I have to append the path contained in my environment variable to the end of the entire PATH, which would look something like this: PATH=C:\path1;C:\path2;C:path3;...etc...;C:\MYIMPORTANTDLLS.

If any of you know how this is done in Qt Creator then I would appreciate your help.

2

2 Answers

2
votes

There is a way to specify other dependencies of the project immediately in the project .pro file. Example from project file:

OTHER_FILES += ..\third-party\libxml2\bin64\libxml2.dll \
    ..\third-party\libiconv\bin64\libiconv.dll
1
votes

You were so close with opening Projects-> Select the Run tab (or Build if you need to change the path for the build step) -> Expand the Build Environment Details and modify the Path there. Then edit the PATH variable to

$(PATH);C:\YourPathAddition