When I try to build mario-dns, the following error message appears:
$ make
g++ -c -pipe -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o resolver.o resolver.cpp
resolver.cpp: In member function ‘void Resolver::convertStrToRaw(const QString&, Address&)’:
resolver.cpp:114:46: error: invalid use of incomplete type ‘Address’ {aka ‘struct std::array<unsigned char, 16>’}
114 | inet_pton(AF_INET6, str.toUtf8(), (void*)array.data());
| ^~~~~
In file included from /usr/include/c++/12/functional:54,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qhashfunctions.h:48,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:47,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:46,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qshareddata.h:46,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qjsonvalue.h:45,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qjsonobject.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/QJsonObject:1,
from jsonanswer.h:5,
from resolver.h:4,
from resolver.cpp:2:
/usr/include/c++/12/tuple:1595:45: note: declaration of ‘Address’ {aka ‘struct std::array<unsigned char, 16>’}
1595 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
resolver.cpp: In member function ‘QString Resolver::getBase32(const Address&)’:
resolver.cpp:119:45: error: invalid use of incomplete type ‘const Address’ {aka ‘const struct std::array<unsigned char, 16>’}
119 | return cppcodec::base32_rfc4648::encode(rawAddr.data(), ADDRIPV6_SIZE).c_str();
| ^~~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of ‘Address’ {aka ‘struct std::array<unsigned char, 16>’}
1595 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
resolver.cpp: In member function ‘QString Resolver::decodeMeshToIP(const QString&)’:
resolver.cpp:134:13: error: aggregate ‘Address rawAddr’ has incomplete type and cannot be defined
134 | Address rawAddr;
| ^~~~~~~
resolver.cpp: In member function ‘QString Resolver::getAddress(const Address&)’:
resolver.cpp:161:25: error: invalid use of incomplete type ‘const Address’ {aka ‘const struct std::array<unsigned char, 16>’}
161 | inet_ntop(AF_INET6, rawAddr.data(), ipStrBuf, 46);
| ^~~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of ‘Address’ {aka ‘struct std::array<unsigned char, 16>’}
1595 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
resolver.cpp: In member function ‘void Resolver::toMeship(const QString&, QSharedPointer<QTextStream>, bool)’:
resolver.cpp:281:13: error: aggregate ‘Address rawAddr’ has incomplete type and cannot be defined
281 | Address rawAddr;
| ^~~~~~~
make: *** [Makefile:410: resolver.o] Error 1
When I try to build mario-dns, the following error message appears:
```
$ make
g++ -c -pipe -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o resolver.o resolver.cpp
resolver.cpp: In member function ‘void Resolver::convertStrToRaw(const QString&, Address&)’:
resolver.cpp:114:46: error: invalid use of incomplete type ‘Address’ {aka ‘struct std::array<unsigned char, 16>’}
114 | inet_pton(AF_INET6, str.toUtf8(), (void*)array.data());
| ^~~~~
In file included from /usr/include/c++/12/functional:54,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qhashfunctions.h:48,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:47,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:46,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qshareddata.h:46,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qjsonvalue.h:45,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qjsonobject.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/QJsonObject:1,
from jsonanswer.h:5,
from resolver.h:4,
from resolver.cpp:2:
/usr/include/c++/12/tuple:1595:45: note: declaration of ‘Address’ {aka ‘struct std::array<unsigned char, 16>’}
1595 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
resolver.cpp: In member function ‘QString Resolver::getBase32(const Address&)’:
resolver.cpp:119:45: error: invalid use of incomplete type ‘const Address’ {aka ‘const struct std::array<unsigned char, 16>’}
119 | return cppcodec::base32_rfc4648::encode(rawAddr.data(), ADDRIPV6_SIZE).c_str();
| ^~~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of ‘Address’ {aka ‘struct std::array<unsigned char, 16>’}
1595 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
resolver.cpp: In member function ‘QString Resolver::decodeMeshToIP(const QString&)’:
resolver.cpp:134:13: error: aggregate ‘Address rawAddr’ has incomplete type and cannot be defined
134 | Address rawAddr;
| ^~~~~~~
resolver.cpp: In member function ‘QString Resolver::getAddress(const Address&)’:
resolver.cpp:161:25: error: invalid use of incomplete type ‘const Address’ {aka ‘const struct std::array<unsigned char, 16>’}
161 | inet_ntop(AF_INET6, rawAddr.data(), ipStrBuf, 46);
| ^~~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of ‘Address’ {aka ‘struct std::array<unsigned char, 16>’}
1595 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
resolver.cpp: In member function ‘void Resolver::toMeship(const QString&, QSharedPointer<QTextStream>, bool)’:
resolver.cpp:281:13: error: aggregate ‘Address rawAddr’ has incomplete type and cannot be defined
281 | Address rawAddr;
| ^~~~~~~
make: *** [Makefile:410: resolver.o] Error 1
```
A couple years later I opened a project in Qt Creator with Qt6 and built it with no problems, despite the fact that the project was written under Qt5.
In the root of the directory, building Qt projects usually looks like qmake && make or qmake6 && make (If Qt6). Which tool did you use before make?
Hi.
A couple years later I opened a project in Qt Creator with Qt6 and built it with no problems, despite the fact that the project was written under Qt5.
In the root of the directory, building Qt projects usually looks like `qmake && make` or `qmake6 && make` (If Qt6). Which tool did you use before `make`?
When I try to build mario-dns, the following error message appears:
Hi.
A couple years later I opened a project in Qt Creator with Qt6 and built it with no problems, despite the fact that the project was written under Qt5.
In the root of the directory, building Qt projects usually looks like
qmake && make
orqmake6 && make
(If Qt6). Which tool did you use beforemake
?Since Qt5 was in the README, I executed the "normal"
qmake
. The error appears under both Debian and Arch Linux.Compiling with
qmake6
also failes (but with another error):let you check
Works!