ricardoquesada / vchar64

editor for the Commodore 64
http://retro.moe/tag/vchar64/
Other
91 stars 12 forks source link

stateexport.cpp fails with clang++ #65

Closed c64skin closed 3 years ago

c64skin commented 3 years ago

clang++ -c -pipe -std=gnu++11 -Wall -W -pthread -fPIC -DGIT_VERSION=\"0.2.4-32-g5123\" -DVERSION=\"0.2.4\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -isystem /usr/include/c++/v1 -I../../src -I. -Isrc -I/usr/local/include/X11/qt5 -I/usr/local/include/X11/qt5/QtWidgets -I/usr/local/include/X11/qt5/QtGui -I/usr/local/include/X11/qt5/QtNetwork -I/usr/local/include/X11/qt5/QtCore -Irelease -I/usr/X11R6/include -I/usr/X11R6/include/libdrm -I. -I/usr/local/include -I/usr/local/lib/qt5/mkspecs/openbsd-clang -o release/stateexport.o ../../src/stateexport.cpp ../../src/stateexport.cpp:152:20: error: no member named 'hex' in namespace 'Qt'; did you mean simply 'hex'? out << Qt::hex << (unsigned int)charBuffer[i]; ^~~ hex /usr/local/include/X11/qt5/QtCore/qtextstream.h:239:28: note: 'hex' declared here Q_CORE_EXPORT QTextStream &hex(QTextStream &s); ^ ../../src/stateexport.cpp:156:26: error: no member named 'dec' in namespace 'Qt'; did you mean simply 'dec'? out << "\t; " << Qt::dec << i-j << "\n"; ^~~ dec /usr/local/include/X11/qt5/QtCore/qtextstream.h:238:28: note: 'dec' declared here Q_CORE_EXPORT QTextStream &dec(QTextStream &s); ^ ../../src/stateexport.cpp:191:20: error: no member named 'hex' in namespace 'Qt'; did you mean simply 'hex'? out << Qt::hex << (unsigned int)charBuffer[i]; ^~~ hex /usr/local/include/X11/qt5/QtCore/qtextstream.h:239:28: note: 'hex' declared here Q_CORE_EXPORT QTextStream &hex(QTextStream &s); ^ ../../src/stateexport.cpp:195:71: error: no member named 'dec' in namespace 'Qt'; did you mean simply 'dec'? out << " }" << ( i < bufferSize - 1 ? "," : " ") << " // " << Qt::dec << i-j << "\n"; ^~~ dec /usr/local/include/X11/qt5/QtCore/qtextstream.h:238:28: note: 'dec' declared here Q_CORE_EXPORT QTextStream &dec(QTextStream &s); ^ 4 errors generated. gmake[2]: [Makefile.Release:8676: release/stateexport.o] Error 1 gmake[2]: Leaving directory '/home/frakswe/source/vchar64/build/src' gmake[1]: [Makefile:42: release] Error 2 gmake[1]: Leaving directory '/home/frakswe/source/vchar64/build/src' gmake: *** [Makefile:51: sub-src-make_first-ordered] Error 2


I edited out the 'Qt::' part of each of the errors and it produced a binary, but as i'm not a coder i don't know if this is the way really.

dakk commented 3 years ago

@frakswe can I ask you which version of Qt are you using? From qt 5.15 hex, dec and other are deprecated and should be used from namespace Qt. I suspect you are using an older version of qt.

c64skin commented 3 years ago

yeah you're right, i've got qt version 5.13 installed (OpenBSD packages)

c64skin commented 3 years ago

To be fair it says on the frontpage: "Download Qt Creator Community Edition 5.6 or newer (doesn't work with older versions)"

so i am to think 5.6 is really 5.60 then? jeez ah well guess i'll close this then.

ricardoquesada commented 3 years ago

yeah... I'll see why it is failing on newer Qt versions