Skip to content

two error with files in generated_cpp dir. #248

Open
@inportinitial

Description

@inportinitial

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());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions