Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

two error with files in generated_cpp dir. #248

Open
inportinitial opened this issue Jan 13, 2025 · 1 comment
Open

two error with files in generated_cpp dir. #248

inportinitial opened this issue Jan 13, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@inportinitial
Copy link

inportinitial commented Jan 13, 2025

I'm not quite sure which aspects are the key points for developers, so I apologize for any excessive or incomplete information I've provided. (qwq)

environment:

window11 x64 python 3.12 qt6.8.0 nmake

error 1 (i can solve) : )

repeated function declaration in generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.h and .cpp

in file generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.h,and com_trolltech_qt_core_builtin0.cpp,
Regarding some of __ eq __ and __ ne __ functions, both the function declarations in the header file (.h) and the function definitions in the source file (.cpp) appear twice identically, leading to errors of duplicate function declarations and definitions.

solution

My solution was to identify these duplicate functions and delete one of each pair.

error example

such as
image

Partial error messages:(by ai transformed to english)

D:\MyResource\thirdpart\pythonqt-3.5.7\generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.h(446): error C2535: “bool PythonQtWrapper_QLineF::__ne__(QLineF *,const QLineF &) const”: member function already defined or declared (compiling source file ..\generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.cpp)
D:\MyResource\thirdpart\pythonqt-3.5.7\generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.h(445): note: see declaration of “PythonQtWrapper_QLineF::__ne__” (compiling source file ..\generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.cpp)
D:\MyResource\thirdpart\pythonqt-3.5.7\generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.h(450): error C2535: “bool PythonQtWrapper_QLineF::__eq__(QLineF *,const QLineF &) const”: member function already defined or declared (compiling source file ..\generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.cpp)
D:\MyResource\thirdpart\pythonqt-3.5.7\generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.h(449): note: see declaration of “PythonQtWrapper_QLineF::__eq__” (compiling source file ..\generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.cpp)
D:\MyResource\thirdpart\pythonqt-3.5.7\generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.h(712): error C2535: “bool PythonQtWrapper_QPointF::__ne__(QPointF *,const QPointF &) const”: member function already defined or declared (compiling source file ..\generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.cpp)

error 2 (i can't solve QAQ)

when i do nmake for extensions,it is reported that QCborMap and QJsonObject are being used incorrectly. I haven't found a solution for this issue.

Partial error messages(by ai transformed to english)

..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core1.cpp(3675): error C2039: "QLatin1StringMatcher": is not a member of "QJsonObject"
D:\QT\6.8.0\msvc2022_64\include\QtCore\qjsonobject.h(19): note: see declaration of "QJsonObject"
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core1.cpp(3680): error C2039: "QLatin1StringMatcher": is not a member of "QJsonObject"
D:\QT\6.8.0\msvc2022_64\include\QtCore\qjsonobject.h(19): note: see declaration of "QJsonObject"
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core1.cpp(3685): error C2039: "caseSensitivity": is not a member of "QJsonObject"
D:\QT\6.8.0\msvc2022_64\include\QtCore\qjsonobject.h(19): note: see declaration of "QJsonObject"
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core1.cpp(3710): error C2039: "indexIn": is not a member of "QJsonObject"
D:\QT\6.8.0\msvc2022_64\include\QtCore\qjsonobject.h(19): note: see declaration of "QJsonObject"
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core1.cpp(3715): error C2039: "indexIn": is not a member of "QJsonObject"
D:\QT\6.8.0\msvc2022_64\include\QtCore\qjsonobject.h(19): note: see declaration of "QJsonObject"
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core1.cpp(3745): error C2039: "pattern": is not a member of "QJsonObject"
D:\QT\6.8.0\msvc2022_64\include\QtCore\qjsonobject.h(19): note: see declaration of "QJsonObject"
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core1.cpp(3755): error C2039: "setCaseSensitivity": is not a member of "QJsonObject"
D:\QT\6.8.0\msvc2022_64\include\QtCore\qjsonobject.h(19): note: see declaration of "QJsonObject"
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core1.cpp(3760): error C2039: "setPattern": is not a member of "QJsonObject"
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core0.cpp(5247): error C2027: use of undefined type 'QCborMap'
D:\QT\6.8.0\msvc2022_64\include\QtCore/qmetatype.h(1569): note: see declaration of 'QCborMap'
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core0.cpp(5247): error C2079: 'PythonQtWrapper_QCborValue::toMap' uses undefined class 'QCborMap'
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core0.cpp(5249): error C2027: use of undefined type 'QCborMap'
D:\QT\6.8.0\msvc2022_64\include\QtCore/qmetatype.h(1569): note: see declaration of 'QCborMap'
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core0.cpp(5252): error C2027: use of undefined type 'QCborMap'
D:\QT\6.8.0\msvc2022_64\include\QtCore/qmetatype.h(1569): note: see declaration of 'QCborMap'
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core0.cpp(5252): error C2079: 'PythonQtWrapper_QCborValue::toMap' uses undefined class 'QCborMap'
..\..\generated_cpp\com_trolltech_qt_core\com_trolltech_qt_core0.cpp(5254): error C2027: use of undefined type 'QCborMap'
D:\QT\6.8.0\msvc2022_64\include\QtCore/qmetatype.h(1569): note: see declaration of 'QCborMap'

part of error code

QJsonObject  PythonQtWrapper_QJsonObject::QLatin1StringMatcher(QJsonObject* theWrappedObject, QLatin1String  pattern, Qt::CaseSensitivity  cs)
{
  return ( theWrappedObject->QLatin1StringMatcher(pattern, cs));
}

Qt::CaseSensitivity  PythonQtWrapper_QJsonObject::caseSensitivity(QJsonObject* theWrappedObject) const
{
  return ( theWrappedObject->caseSensitivity());
}
@inportinitial inportinitial changed the title repeated function declaration in generated_cpp\com_trolltech_qt_core_builtin\com_trolltech_qt_core_builtin0.h and .cpp error with files in generated_cpp dir. Jan 13, 2025
@inportinitial inportinitial changed the title error with files in generated_cpp dir. two error with files in generated_cpp dir. Jan 13, 2025
@mrbean-bremen
Copy link
Contributor

Thanks! PythonQt does not yet support Qt 6.8 - this needs some changes in the preprocessor, which may take a bit.
Until then you are stuck with Qt 6.7 (hopefully not long).

@mrbean-bremen mrbean-bremen added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants