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

Build: qt6 - nmake error C3861: 'tr' identifier not found nmake error in ifcdef.cpp #1019

Open
slspencer opened this issue Aug 23, 2023 · 0 comments

Comments

@slspencer
Copy link
Collaborator

slspencer commented Aug 23, 2023

Describe the problem or new action
qt6 build with Windows / MSVC 2019 / Qt 6.5.2 generates this error (most of the error is the cl.exe command & parameters)

-I..\..\..\..\seamly2d\src\libs\ifc 
-I. 
-I..\..\..\..\seamly2d\src\libs\vtools 
-I..\..\..\..\seamly2d\src\libs\vwidgets 
-I..\..\..\..\seamly2d\src\libs\vformat 
-I..\..\..\..\seamly2d\src\libs\vpatterndb 
-I..\..\..\..\seamly2d\src\libs\fervor 
-I..\..\..\..\seamly2d\src\libs\vmisc 
-I..\..\..\..\seamly2d\src\libs\vgeometry 
-I..\..\..\..\seamly2d\src\libs\ifc 
-I..\..\..\..\seamly2d\src\libs\vlayout 
-I..\..\..\..\seamly2d\src\libs\qmuparser 
-I..\..\..\..\seamly2d\src\libs\vpropertyexplorer 
-I..\..\..\..\seamly2d\src\libs\vtest 
-I..\..\..\..\seamly2d\src\libs\xerces-c\msvc\include 
-ID:\ProgramFiles\Qt6\6.5.2\msvc2019_64\include 
-ID:\ProgramFiles\Qt6\6.5.2\msvc2019_64\include\QtXml 
-ID:\ProgramFiles\Qt6\6.5.2\msvc2019_64\include\QtPrintSupport 
-ID:\ProgramFiles\Qt6\6.5.2\msvc2019_64\include\QtWidgets 
-ID:\ProgramFiles\Qt6\6.5.2\msvc2019_64\include\QtGui 
-ID:\ProgramFiles\Qt6\6.5.2\msvc2019_64\include\QtCore 
-Imoc 
-I/include 
-ID:\ProgramFiles\Qt6\6.5.2\msvc2019_64\mkspecs\win32-msvc 
-Foobj\ 
@C:\Users\SLSPEN~1\AppData\Local\Temp\nm8D94.tmp
ifcdef.cpp
..\..\..\..\seamly2d\src\libs\ifc\ifcdef.cpp(248): error C2027: use of undefined type 'QObject'
D:\ProgramFiles\Qt6\6.5.2\msvc2019_64\include\QtCore/qsharedpointer_impl.h(36): note: see declaration of 'QObject'
..\..\..\..\seamly2d\src\libs\ifc\ifcdef.cpp(248): error C3861: 'tr': identifier not found
..\..\..\..\seamly2d\src\libs\ifc\ifcdef.cpp(251): error C2027: use of undefined type 'QObject'
D:\ProgramFiles\Qt6\6.5.2\msvc2019_64\include\QtCore/qsharedpointer_impl.h(36): note: see declaration of 'QObject'
..\..\..\..\seamly2d\src\libs\ifc\ifcdef.cpp(251): error C3861: 'tr': identifier not found
..\..\..\..\seamly2d\src\libs\ifc\ifcdef.cpp(254): error C2027: use of undefined type 'QObject'
D:\ProgramFiles\Qt6\6.5.2\msvc2019_64\include\QtCore/qsharedpointer_impl.h(36): note: see declaration of 'QObject'
..\..\..\..\seamly2d\src\libs\ifc\ifcdef.cpp(254): error C3861: 'tr': identifier not found
..\..\..\..\seamly2d\src\libs\ifc\ifcdef.cpp(257): error C2027: use of undefined type 'QObject'
D:\ProgramFiles\Qt6\6.5.2\msvc2019_64\include\QtCore/qsharedpointer_impl.h(36): note: see declaration of 'QObject'
..\..\..\..\seamly2d\src\libs\ifc\ifcdef.cpp(257): error C3861: 'tr': identifier not found
..\..\..\..\seamly2d\src\libs\ifc\ifcdef.cpp(260): error C2027: use of undefined type 'QObject'
D:\ProgramFiles\Qt6\6.5.2\msvc2019_64\include\QtCore/qsharedpointer_impl.h(36): note: see declaration of 'QObject'
..\..\..\..\seamly2d\src\libs\ifc\ifcdef.cpp(260): error C3861: 'tr': identifier not found
..\..\..\..\seamly2d\src\libs\ifc\ifcdef.cpp(264): error C2027: use of undefined type 'QObject'
D:\ProgramFiles\Qt6\6.5.2\msvc2019_64\include\QtCore/qsharedpointer_impl.h(36): note: see declaration of 'QObject'
..\..\..\..\seamly2d\src\libs\ifc\ifcdef.cpp(264): error C3861: 'tr': identifier not found```
**Is this for a particular OS?**

**Can this be handled in Github Actions (https://github.com/marketplace?type=actions)**
The fix is to include the Qt6's QObject:
``` #include<QObject>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants