hoehrmann / CutyCapt

A Qt WebKit Web Page Rendering Capture Utility
http://cutycapt.sourceforge.net/
99 stars 49 forks source link

problem with compilation #3

Closed copyhold closed 11 years ago

copyhold commented 11 years ago

$ make g++ -c -m64 -pipe -O2 -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_SVG_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQTSHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -I. -o CutyCapt.o CutyCapt.cpp CutyCapt.cpp: In member function ‘void CutyCapt::handleSslErrors(QNetworkReply, QList)’: CutyCapt.cpp:246:10: error: invalid use of incomplete type ‘class QNetworkReply’ In file included from /usr/include/qt4/QtWebKit/qgraphicswebview.h:24:0, from /usr/include/qt4/QtWebKit/QtWebKit:3, from CutyCapt.cpp:27: /usr/include/qt4/QtWebKit/qwebpage.h:40:7: error: forward declaration of ‘class QNetworkReply’ CutyCapt.cpp: At global scope: CutyCapt.cpp:244:1: warning: unused parameter ‘errors’ [-Wunused-parameter] make: _\ [CutyCapt.o] Error 1

g1plus commented 11 years ago

I run into this problem as well (I currently maintain the AUR-package for Arch Linux) and solved it by adding

#include <QNetworkReply>
#include <QSslError>

to CutyCapt.cpp This only applies to qt4. For qt5 no changes are needed.

copyhold commented 11 years ago

now I have /usr/include/qt4/QtNetwork/qnetworkaccessmanager.h:64:7: error: forward declaration of ‘class QSslError’

g1plus commented 11 years ago

Sorry meant the .hpp My patch-file looks like this:

--- cutycapt/cutycapt-code/CutyCapt/CutyCapt.hpp    2013-07-06 16:04:16.028585091 +0200
+++ CutyCapt.hpp    2013-07-06 15:59:06.000000000 +0200
@@ -1,4 +1,6 @@
 #include <QtWebKit>
+#include <QNetworkReply>
+#include <QSslError>

 #if QT_VERSION >= 0x050000
 #include <QtWebKitWidgets>```
copyhold commented 11 years ago

ohh, this way it worked Thank you

kolabse commented 9 years ago

this way it worked Thank you!!!!!!!!!!!!!!!!!!!!!!!!!!

swapnilsarwe commented 9 years ago

had similar issue.... the solution worked for me too... cant is be fixed in the SVN repo directly

sourabhmodi commented 8 years ago

Worked... Thank you ...!!!!

chenyachao commented 8 years ago

Cool! Worked for me, thank you!

ghukill commented 7 years ago

Worked for me as well.