How to add Qt libraries to visual studio

前端 未结 1 1905
挽巷
挽巷 2021-02-03 15:40

I have a source with VC++ 2017 I receive the error \"Error C1083 Cannot open include file: \'QtCore/QMap\': No such file or directory \" when i try comp

相关标签:
1条回答
  • 2021-02-03 15:57

    You need to update your project. Go to the project properties by right-clicking on it in Solution Explorer and then select Properties. Then:

    • In C/C++->General->Additional Include Directories you must set the Qt installation include path;
    • In Linker->General->Additional Library Directories you must add the path of .libs files of your qt installation;
    • In Linker->Input->Additional Dependencies you must put the name of .lib files that you need in order to build the project.

    If it's a Qt project, you should also have the Qt plugin installed, in order to work properly with moc and other Qt features.

    In alternative (that I suggest) you can create a CMake project and open in in Visual Studio.

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