Unsolved The Qt static link can't get the valid instance in .dll file.
-
The Qt static link can't get the valid instance in .dll file. (Win7, x64)
I want to create a QWidget in my .dll file, but something wrong with this.
I don't know why. Can anyone help me?There are 3 situations
Situation 1:
Use the static link lib between .exe & .dll
it doesn't work. qAPP = nullptr
Situation 2:
Use the dynmic lib in .exe
Use the static link lib in .dll
it doesn't work. qAPP = nullptr
Situation 3:
Use the dynmic lib in between .exe & .dll
it does work. qAPP is valid.
Thank you!
-
In the first two version you have to Qt runtimes - this can't work.
Either compile your complete program as static or as dynamic, mixing will not work (as you've noticed) -
OK, If I want to create a QWidget from MyTest.dll.
Is this the only way to use the Qt dynamic linking? Don't use the QT runtimes.Thank you.