Open shenmo7192 opened 4 years ago
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I../../Game -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o cardcombine.o ../cardcombine.cpp ../cardcombine.cpp:4:12: error: ‘std::memset’ has not been declared using std::memset; ^~ ../cardcombine.cpp: In member function ‘Point CardCombine::representPoint(CardCombine::Type)’: ../cardcombine.cpp:430:11: warning: enumeration value ‘Unknown’ not handled in switch [-Wswitch] switch(type) ^ Makefile:445: recipe for target 'cardcombine.o' failed make: *** [cardcombine.o] Error 1
我使用QT5.9和MINGW编译通过了,你这个问题需要将using std::memset;注释掉,加一个#include"stdlib.h"就可以了
linux怎么编译啊
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I../../Game -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o cardcombine.o ../cardcombine.cpp ../cardcombine.cpp:4:12: error: ‘std::memset’ has not been declared using std::memset; ^
~../cardcombine.cpp: In member function ‘Point CardCombine::representPoint(CardCombine::Type)’: ../cardcombine.cpp:430:11: warning: enumeration value ‘Unknown’ not handled in switch [-Wswitch] switch(type) ^ Makefile:445: recipe for target 'cardcombine.o' failed make: *** [cardcombine.o] Error 1