How can I use the Windows SDK with Qt Creator

前端 未结 1 565
眼角桃花
眼角桃花 2021-02-05 22:10

I have been trying to use the Windows SDK v7.1 in Qt Creator without much luck. Specifically, how can I set up Qt Creator so that it will compile the SDK samples in C:\\Pr

相关标签:
1条回答
  • 2021-02-05 23:08

    Create new project in Qt Creator using File|New File or Project, choose Other Project from Projects list and then choose Import Existing Project anc click Choose... button. Then select the folder with SDK example, click Next and click Finish. Click Projects on the left (or press Ctrl+5), and in Tool chain combo choose Microsoft Visual C++. Now click Details under Build Environment, check Clear system environment and variables and their values as below:

    COMSPEC   C:\Windows\system32\cmd.exe
    INCLUDE   C:\Program Files\Microsoft SDKs\Windows\v7.1\Include;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;
    LIB       C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib;
    PATH      C:\Windows\System32;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;
    PROCESSOR_ARCHITECTURE x86
    

    You should modify above values according to your setup (places where you installed Visual C++ and where you installed Windows SDK).

    Now click Build All (or press Ctrl+Shift+B) and the example should be built.

    0 讨论(0)
提交回复
热议问题