A
A
annas_082021-12-27 20:22:21
Qt
annas_08, 2021-12-27 20:22:21

Qt and Visual Studio 2022?

Decided to try Visual Studio 2022. I use Qt 6.2.2 version (the package includes qmake for visual studio 2019, but it should work from 2022 according to the description). When I try to run the simplest project (an empty window), I get an error:

Error LNK2019 reference to unresolved external symbol "public: __cdecl QtWidgetsApplication1::QtWidgetsApplication1(class QWidget *)" ([email protected]@[email protected]@@@Z) in function "public: __cdecl `public: static void (__cdecl*__cdecl QtPrivate::QMetaTypeForType::getDefaultCtr(void))(class QtPrivate::QMetaTypeInterface const *,void *)'::`5'::::operator()(class QtPrivate::QMetaTypeInterface const *,void *)const " ([email protected][email protected][email protected]@@@[email protected]@[email protected]@[email protected]@[email protected]@Z). QtWidgetsApplication1 C:\Users\source\repos\QtWidgetsApplication1\QtWidgetsApplication1\moc_QtWidgetsApplication1.obj 1

What could be the reason (using c++20 , debug)

PS in VS 2019 everything was ok

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2021-12-27
@Zifix

the package includes qmake for visual studio 2019, but should work from 2022 as described

In theory, there is no difference between theory and practice. But in practice there is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question