Same set of files can run in QTCreator but not in VS 2022
Moved
Unsolved
Qt Creator and other tools
-
I just had some test files on both platforms. In VS 2022 I get loads of LNK errors.
and I created the .pro in the VS 2022 using the qt addons. But the .pro and the .pri files are not the same as what is created directly by QTCreator, and it says it cannot find my .ui file. But if I use the template of the .pro created by QTCreator, it works.I wonder how you guys use VS to do qt?
Many thanks,
ChristopherThe .pro and .pri created by VS are as follow
pro:# ---------------------------------------------------- # This file is generated by the Qt Visual Studio Tools. # ------------------------------------------------------ TEMPLATE = app TARGET = Microuija DESTDIR = ../x64/Debug CONFIG += debug LIBS += -L"." DEPENDPATH += . MOC_DIR += . OBJECTS_DIR += debug UI_DIR += . RCC_DIR += GeneratedFiles include(Microuija.pri)
pri:
# ---------------------------------------------------- # This file is generated by the Qt Visual Studio Tools. # ------------------------------------------------------ # This is a reminder that you are using a generated .pro file. # Remove it when you are finished editing this file. message("You are running qmake on a generated .pro file. This may not work!") HEADERS += ./MO_Main.h SOURCES += ./main.cpp \ ./MO_Main.cpp FORMS += ./MOMain.ui