我正在尝试使用 Qt Creator 构建一个小 qt 项目。\ni 将此驱动程序添加到我的项目中: https: //github.com/cisco-open-source/qtwebdriver
\n\n我包括它的库,
\n\n当我尝试构建时,我得到了这个:
\n\ng++ -c -pipe -g -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../OfirWebDriverProj -I. -I../ofir/qtwebdriver/out/dist/desktop/release/libs -I../ofir/qtwebdriver/out/dist/desktop/release/libs -I../ofir/qtwebdriver/out/dist/desktop/release/libs -I../ofir/qtwebdriver/out/dist/desktop/release/libs -I../ofir/qtwebdriver/out/desktop/release/Default/lib.target -I../ofir/qtwebdriver/out/desktop/release/Default/lib.target -I../ofir/qtwebdriver/out/desktop/release/Default/lib.target -I../ofir/qtwebdriver/out/desktop/release/Default/lib.target -I../ofir/qtwebdriver/out/dist/desktop/release/h/base -I../ofir/qtwebdriver/out/dist/desktop/release/h -I../ofir/qtwebdriver/out/dist/desktop/release/Test -I/opt/Qt5.9.1/5.9.1/gcc_64/include -I/opt/Qt5.9.1/5.9.1/gcc_64/include/QtWidgets -I/opt/Qt5.9.1/5.9.1/gcc_64/include/QtGui -I/opt/Qt5.9.1/5.9.1/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I. -I/opt/Qt5.9.1/5.9.1/gcc_64/mkspecs/linux-g++ -o main.o ../OfirWebDriverProj/main.cpp\n\nIn file included from /usr/include/c++/7/chrono:41:0,\n from /opt/Qt5.9.1/5.9.1/gcc_64/include/QtCore/qobject.h:59,\n from /opt/Qt5.9.1/5.9.1/gcc_64/include/QtCore/qcoreapplication.h:46,\n from /opt/Qt5.9.1/5.9.1/gcc_64/include/QtWidgets/qapplication.h:44,\n from /opt/Qt5.9.1/5.9.1/gcc_64/include/QtWidgets/QApplication:1,\n from ../OfirWebDriverProj/main.cpp:2:\n\n/usr/include/c++/7/ctime:64:11: error: \xe2\x80\x98::clock\xe2\x80\x99 has not been declared\n using ::clock;\n ^~~~~\n\n/usr/include/c++/7/ctime:65:11: error: \xe2\x80\x98::difftime\xe2\x80\x99 has not been declared\n using ::difftime;\n ^~~~~~~~\n\n/usr/include/c++/7/ctime:66:11: error: \xe2\x80\x98::mktime\xe2\x80\x99 has not been declared\n using ::mktime;\n ^~~~~~\n\n/usr/include/c++/7/ctime:67:11: error: \xe2\x80\x98::time\xe2\x80\x99 has not been declared\n using ::time;\n ^~~~\n\n/usr/include/c++/7/ctime:68:11: error: \xe2\x80\x98::asctime\xe2\x80\x99 has not been declared\n using ::asctime;\n ^~~~~~~\n\n/usr/include/c++/7/ctime:69:11: error: \xe2\x80\x98::ctime\xe2\x80\x99 has not been declared\n using ::ctime;\n ^~~~~\n\n/usr/include/c++/7/ctime:70:11: error: \xe2\x80\x98::gmtime\xe2\x80\x99 has not been declared\n using ::gmtime;\n ^~~~~~\n\n/usr/include/c++/7/ctime:71:11: error: \xe2\x80\x98::localtime\xe2\x80\x99 has not been declared\n using ::localtime;\n ^~~~~~~~~\n\n/usr/include/c++/7/ctime:72:11: error: \xe2\x80\x98::strftime\xe2\x80\x99 has not been declared\n using ::strftime;\n ^~~~~~~~\n
Run Code Online (Sandbox Code Playgroud)\n