[Problem record] The Qt project under Visual Studio cannot open the "xxx.ui" file and LNK1104 cannot open the file "Qt5Cored.lib" error

environment

  • Windows 11 Home Chinese Edition
  • Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.5.3
  • qt-vsaddin-msvc2022-2.9.1-rev.06

problem arises

  1. After the Qt environment under VS is ready, create a Qt project and then click on the " xxx.ui " file  under Form Files . After the Qt Designer interface pops up, it crashes and displays the following error

  2. Running error: LNK1104 cannot open the file "Qt5Cored.lib"

the solution

  1. Click on the toolbar in turn: Extension 1 > Qt VS Tools 1 > options  to pop up the option interface, set as follows

  2. Right click on the Qt project and open the project property page: Linker 1>General 1>Additional library directory Input $(QMake_QT_INSTALL_LIBS_)

Guess you like

Origin blog.csdn.net/weixin_43729127/article/details/131165520