Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qtcreator which is compiled by myself can not run



  • This is my step:



    How to compile qt and qtcreator in windows10

    Compile qt

    Compile qt 5.13.0

    1. Download qt src.

      http://download.qt.io/
      
    2. Unpackeed to specific directory.

      C:\qt\
      
    3. Make deploy directory.

      C:\qt\qt-5.13.0-deploy
      
    4. Use msvc 2017 x64 command line.

      一定要使用 msvc 2017 命令行,不然要自己设置它的环境变量.

    5. Configure qt.

      cd /d C:\qt\qt-everywhere-src-5.13.0
      configure -prefix C:\qt\qt-5.13.0-deploy -release -opensource -opengl dynamic -platform win32-msvc -c++std c++14 -skip qtmultimedia -skip qtsensors -skip qtwebengine -skip qtgamepad -nomake examples -nomake tests -mp -skip qtlocation -skip qtserialbus -confirm-license
      

      目录最好短,不然可能出问题.
      目录最好不要有中文,不要有空格.
      -prefix指定安装目录.
      -c++std要指定c++14.

    6. Compile.

      jom -j 10
      

      jom是多线程版的nmake,要快很多很多.

    7. Deploy.

      jom -j 10 install
      
    8. Test.

      Qt环境已经部署到了安装目录,可以运行下bin里的程序.

    Compile qtcreator

    Compile qtcreator 4.9.2

    1. The qt and qtcreator must be sure to pair. The error pair is very dangerous, if you can compile complement.

    2. Download qtcreator src.

      http://download.qt.io/
      
    3. Unpackeed to specific directory.

      C:\qt\
      
    4. Make deploy directory.

      C:\qt\qtcreator-4.9.2-deploy
      
    5. Use msvc 2017 x64 command line.

      一定要使用 msvc 2017 命令行,不然要自己设置它的环境变量.

    6. Compile.

      jom -j 10
      
    7. windeployqt for qtcreator



    After those, I get the error when runs qtcreator.

    Failed to load core: C:\qt\qt-creator-opensource-src-4.9.2\lib\qtcreator\plugins\Core4.dll: Cannot load library C:\qt\qt-creator-opensource-src-4.9.2\lib\qtcreator\plugins\Core4.dll: This specified module could not be found.
    

    But the this file is existed, and they are x64 program.

    Need help, thanks, thanks, thanks.


  • Lifetime Qt Champion

    @spobit You can use Dependency Walker to search for unresolved dependencies in Core4.dll.

    Regards



  • @aha_1980 said in Qtcreator which is compiled by myself can not run:

    Dependency

    Thank you very much.

    Your method leads me to find the problem.



  • Dependency Walker can not give me some help:

    qtcreator which can not run:

    API-MS-WIN-CORE-APIQUERY-L1-1-0.DLL
    API-MS-WIN-CORE-APIQUERY-L1-1-1.DLL
    API-MS-WIN-CORE-APPCOMPAT-L1-1-0.DLL
    API-MS-WIN-CORE-APPCOMPAT-L1-1-1.DLL
    API-MS-WIN-CORE-APPINIT-L1-1-0.DLL
    API-MS-WIN-CORE-ATOMS-L1-1-0.DLL
    API-MS-WIN-CORE-COM-L1-1-0.DLL
    API-MS-WIN-CORE-COM-L1-1-1.DLL
    ...
    
    Error: At least one required implicit or forwarded dependency was not found.
    Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
    Error: A circular dependency was detected.
    Warning: At least one delay-load dependency module was not found.
    Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
    

    qtcreator which can run:

    API-MS-WIN-CORE-APIQUERY-L1-1-0.DLL
    API-MS-WIN-CORE-APIQUERY-L1-1-1.DLL
    API-MS-WIN-CORE-APPCOMPAT-L1-1-0.DLL
    API-MS-WIN-CORE-APPCOMPAT-L1-1-1.DLL
    API-MS-WIN-CORE-APPINIT-L1-1-0.DLL
    API-MS-WIN-CORE-ATOMS-L1-1-0.DLL
    API-MS-WIN-CORE-COM-L1-1-0.DLL
    ...
    
    Error: At least one required implicit or forwarded dependency was not found.
    Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
    Error: Modules with different CPU types were found.
    Error: A circular dependency was detected.
    Warning: At least one delay-load dependency module was not found.
    Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
    

    X64dbg

    qtcreator which can not run:

    ...
    DLL Loaded: 00007FFDD0A70000 C:\qt\qt-creator-opensource-src-4.9.2\bin\styles\qwindowsvistastyle.dll
    Skipping unsupported debug type IMAGE_DEBUG_TYPE_POGO in module core4.dll...
    Did not find any supported debug types in module core4.dll!
    DLL Loaded: 00007FFD9C7B0000 C:\qt\qt-creator-opensource-src-4.9.2\lib\qtcreator\plugins\Core4.dll
    Skipping unsupported debug type IMAGE_DEBUG_TYPE_POGO in module aggregation4.dll...
    Did not find any supported debug types in module aggregation4.dll!
    DLL Loaded: 00007FFDDD1C0000 C:\qt\qt-creator-opensource-src-4.9.2\bin\Aggregation4.dll
    DLL Unloaded: 00007FFDDD1C0000 aggregation4.dll
    DLL Unloaded: 00007FFD9C7B0000 core4.dll
    ...
    

    qtcreator which can run:

    ...
    DLL Loaded: 632F0000 C:\_App\Qt\Tools\Preview\Qt Creator 4.10.0-rc1\bin\plugins\styles\qwindowsvistastyle.dll
    DLL Loaded: 630E0000 C:\_App\Qt\Tools\Preview\Qt Creator 4.10.0-rc1\lib\qtcreator\plugins\Core4.dll
    DLL Loaded: 630D0000 C:\_App\Qt\Tools\Preview\Qt Creator 4.10.0-rc1\bin\Aggregation4.dll
    ...
    

    I am confused who to do later.



  • The problem is solved. The program is running after I add the Qt5PrintSupport.dll and Qt5Sql.dll and Qt5Script.dll.

    ...
    DLL Loaded: 63320000 C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_b473681ad654fb12\igc32.dll
    DLL Loaded: 632F0000 C:\_App\Qt\Tools\Preview\Qt Creator 4.10.0-rc1\bin\plugins\styles\qwindowsvistastyle.dll
    DLL Loaded: 630E0000 C:\_App\Qt\Tools\Preview\Qt Creator 4.10.0-rc1\lib\qtcreator\plugins\Core4.dll
    DLL Loaded: 630D0000 C:\_App\Qt\Tools\Preview\Qt Creator 4.10.0-rc1\bin\Aggregation4.dll
    DLL Loaded: 63080000 C:\_App\Qt\Tools\Preview\Qt Creator 4.10.0-rc1\bin\Qt5PrintSupport.dll
    DLL Loaded: 63050000 C:\_App\Qt\Tools\Preview\Qt Creator 4.10.0-rc1\bin\Qt5Sql.dll
    DLL Loaded: 62F30000 C:\_App\Qt\Tools\Preview\Qt Creator 4.10.0-rc1\bin\Qt5Script.dll
    DLL Loaded: 76A70000 C:\Windows\SysWOW64\comdlg32.dll
    DLL Loaded: 70020000 C:\Windows\SysWOW64\winspool.drv
    ...
    

    And Most plugins can not load, you should do that:

    C:\qt\qt-5.13.0-deploy\bin\windeployqt.exe <pluginName>
    

    Thank you for help.



  • The best method to solve dependence problem is setting the environment variable.

    ```
    C:\qt\qt-5.13.0-deploy\bin
    ```
    

    But you should know it is a bad method for multiple qt.


Log in to reply