Compile errors because of "new" file
Unsolved
General and Desktop
-
Hi all -
I accidentally generated a file which is named "new" in the building path. When I compile next time, many compile errors show up. As shown below :
... ... ... In file included from C:\Qt\5.12.5\mingw73_32\include/QtCore/qvariant.h:47:0, from C:\Qt\5.12.5\mingw73_32\include\QtGui/qevent.h:50, from C:\Qt\5.12.5\mingw73_32\include\QtGui/QList:1, from debug\../../remove999fracture/postable.h:5, from debug\../../remove999fracture/worker.h:5, from debug\moc_worker.cpp:9: C:\Qt\5.12.5\mingw73_32\include/QtCore/qmap.h: In instantiation of 'QMapData<Key, T>::Node* QMapData<Key, T>::createNode(const Key&, const T&, QMapData<Key, T>::Node*, bool) [with Key = QString; T = QVariant; QMapData<Key, T>::Node = QMapNode<QString, QVariant>]': C:\Qt\5.12.5\mingw73_32\include/QtCore/qmap.h:811:11: required from 'QMap<K, V>::iterator QMap<K, V>::insertMulti(const Key&, const T&) [with Key = QString; T = QVariant]' C:\Qt\5.12.5\mingw73_32\include/QtCore/qvariant.h:823:66: required from here C:\Qt\5.12.5\mingw73_32\include/QtCore/qmap.h:228:13: error: no matching function for call to 'operator new(sizetype, QString*)' new (&n->key) Key(k); ^~~~~~~~~~~~~~~~~~~~ <built-in>: note: candidate: void* operator new(unsigned int) <built-in>: note: candidate expects 1 argument, 2 provided C:\Qt\5.12.5\mingw73_32\include/QtCore/qmap.h:230:17: error: no matching function for call to 'operator new(sizetype, QVariant*)' new (&n->value) T(v); ^~~~~~~~~~~~~~~~~~~~ <built-in>: note: candidate: void* operator new(unsigned int) <built-in>: note: candidate expects 1 argument, 2 provided ... ... ...
I guess this result is either that the "new" file overwrites the original file or it is related to the instructions in the makefile.
But I'm not sure what actually happened.There is my file path.
-
Don't use that name since it's a system header.