but if you write a simple test program (B) , this program just detection, and print the default recording equipment name, in the process of running to loader directory under the audio DLL (qtaudio_wasapi. DLL and qtaudio_windows. DLL), the program can be run normally at this time,
now the question is: why can't a program normal load corresponding DLL, led to the program does not run normally, but not collapse; And another program can run normally, function also is normal?
In the use of windeployqt after deployment of the application, you can see copy of DLL, Qt5Core. DLL is modified,
But if the installation directory Qt5Core. DLL copied directly, and then run the program. A, can be normal operation of the program, the corresponding DLL will be loaded, but part of the DLL is loaded installation directory DLL, rather than the current program directory DLL, it is strange that
But if will copy the two programs on a computer is not install qt (have used windeployqt deployment, also complete corresponding DLL), the program can run, but cannot be detected in normal recording equipment, (audio folder under the two DLL has not been loaded: qtaudio_wasapi. DLL and qtaudio_windows. DLL)
CodePudding user response:
The normal procedure,The core is at the beginning of the main function of this sentence: QCoreApplication: : addLibraryPath ("./");