can't find dll when debug/run in QtCreator
-
wrote on 16 Jan 2019, 17:51 last edited by jronald
both methods don't work
- projects -> Build & Run -> Run -> Run Environment -> append dll dir paths to variable "Path"
- add dll dir paths to system environment "Path"
env
- os: win10
- kit: MSVC2017
- Qt: 5.12.0
- QtCreator: 4.8.0
BTW, if copy the dll to the dir where the executable is, it works.
-
wrote on 17 Jan 2019, 04:42 last edited by
solved
The first method works, my mistake to not include enough path, QtCreator ignores all os environment variable "Path".BTW, it seems that dll can be specified in .pro file:
https://wiki.qt.io/How_to_link_to_a_dll -
solved
The first method works, my mistake to not include enough path, QtCreator ignores all os environment variable "Path".BTW, it seems that dll can be specified in .pro file:
https://wiki.qt.io/How_to_link_to_a_dllQtCreator ignores all os environment variable "Path".
It does not - I use it this way (I have a directory c:\dlls). But you have to restart all programs after such a change in order to take effect.
-
QtCreator ignores all os environment variable "Path".
It does not - I use it this way (I have a directory c:\dlls). But you have to restart all programs after such a change in order to take effect.
wrote on 17 Jan 2019, 06:22 last edited by jronald@aha_1980 said in can't find dll when debug/run in QtCreator:
QtCreator ignores all os environment variable "Path".
It does not - I use it this way (I have a directory c:\dlls). But you have to restart all programs after such a change in order to take effect.
I created a new project,
projects -> Build & Run -> Run -> Run Environment -> Path
includes all the paths in os env varPath
, but for my old project is migrated from *nix os, and change os env varPath
doesn't take effects. It seesm that QtCreator only find dlls inprojects -> Build & Run -> Run -> Run Environment -> Path
-
@aha_1980 said in can't find dll when debug/run in QtCreator:
QtCreator ignores all os environment variable "Path".
It does not - I use it this way (I have a directory c:\dlls). But you have to restart all programs after such a change in order to take effect.
I created a new project,
projects -> Build & Run -> Run -> Run Environment -> Path
includes all the paths in os env varPath
, but for my old project is migrated from *nix os, and change os env varPath
doesn't take effects. It seesm that QtCreator only find dlls inprojects -> Build & Run -> Run -> Run Environment -> Path
@jronald Well, if you change the
PATH
there, the systemPATH
is overwritten. But that is to expect, isn't it? -
@jronald Well, if you change the
PATH
there, the systemPATH
is overwritten. But that is to expect, isn't it? -
@aha_1980 that's ok, it means when the project has been created, changing os env var
Path
will not take effect any more.No. Once you changed the
PATH
for a project in Creator, the systemsPATH
no longer applies to this project, i.e. any change to the systemsPATH
have no effect for that project. -
No. Once you changed the
PATH
for a project in Creator, the systemsPATH
no longer applies to this project, i.e. any change to the systemsPATH
have no effect for that project.wrote on 17 Jan 2019, 07:30 last edited by@aha_1980 said in can't find dll when debug/run in QtCreator:
No. Once you changed the
PATH
for a project in Creator, the systemsPATH
no longer applies to this project, i.e. any change to the systemsPATH
have no effect for that project.ok, sophisticated.
3/8