Windows 7, 64 bit, DLL problems

前端 未结 14 946
故里飘歌
故里飘歌 2020-11-22 12:37

I have a problem with our executable. I\'m running this C++ 32-bit executable on my Windows 7 64-bit development box that also has all those Microsoft applications (Vis

14条回答
  •  佛祖请我去吃肉
    2020-11-22 13:29

    I just resolved the same problem with C++ Qt 5 and Windows 7 64 bits with MSCVC 2012.

    In the beginning I thought it was a MSVC/Windows DLL file problem, but as BorisP said, the problem was in my project dependencies. The key is "How to know your project dependencies in Qt 5?".

    As I didn't find any clear way to know it (Dependency Walker didn't help me a lot...), I followed next the "inverse procedure" that takes no more than 5 minutes and avoid a lot of headaches with DLL file dependencies:

    1. Compile your project and take the executable file to an empty folder: myproject.exe
    2. Try to execute it, It will retrieve an error (missing DLL files...).
    3. Now, copy all the DLL files from Qt (in my case they were in C:\Qt\Qt5.1.1\5.1.1\msvc2012_64_opengl\bin) to this folder.
    4. Try to execute again, it will probably works fine.
    5. Start to delete progressively and try every time your executable still works, trying to leave the minimum necessary DLL files.

    When you have all the DLL files in the same folder it is easier to find which of them are not valid (XML, WebKit, ... whatever..), and consequently this method doesn't take more than five minutes.

提交回复
热议问题