A syntax error in your code, usually a missing semi-colon or #include, but without your code we cannot tell.
A syntax error in your code, usually a missing semi-colon or #include, but without your code we cannot tell.
"We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.
Thanks for ur reply.. but when I click on the error .. it takes me to qnetworkaccessmanager.h file itself and
the code is here
Qt Code:
DECLARE_INTERFACE_(IAMMediaContent, IDispatch) { STDMETHOD(get_AuthorName)(THIS_ BSTR*) PURE; STDMETHOD(get_Title)(THIS_ BSTR*) PURE; STDMETHOD(get_Rating)(THIS_ BSTR*) PURE; STDMETHOD(get_Description)(THIS_ BSTR*) PURE; STDMETHOD(get_Copyright)(THIS_ BSTR*) PURE; STDMETHOD(get_BaseURL)(THIS_ BSTR*) PURE; STDMETHOD(get_LogoURL)(THIS_ BSTR*) PURE; STDMETHOD(get_LogoIconURL)(THIS_ BSTR*) PURE; STDMETHOD(get_WatermarkURL)(THIS_ BSTR*) PURE; STDMETHOD(get_MoreInfoURL)(THIS_ BSTR*) PURE; STDMETHOD(get_MoreInfoBannerImage)(THIS_ BSTR*) PURE; STDMETHOD(get_MoreInfoBannerURL)(THIS_ BSTR*) PURE; STDMETHOD(get_MoreInfoText)(THIS_ BSTR*) PURE; };To copy to clipboard, switch view to plain text mode
What immediately precedes your #include <QNetworkAccessManager> line?
Thanks for ur reply.. but when I click on the error .. it takes me to qnetworkaccessmanager.h file itself and
the code is here..
Qt Code:
DECLARE_INTERFACE_(IAMMediaContent, IDispatch) { STDMETHOD(get_AuthorName)(THIS_ BSTR*) PURE; STDMETHOD(get_Title)(THIS_ BSTR*) PURE; STDMETHOD(get_Rating)(THIS_ BSTR*) PURE; STDMETHOD(get_Description)(THIS_ BSTR*) PURE; STDMETHOD(get_Copyright)(THIS_ BSTR*) PURE; STDMETHOD(get_BaseURL)(THIS_ BSTR*) PURE; STDMETHOD(get_LogoURL)(THIS_ BSTR*) PURE; STDMETHOD(get_LogoIconURL)(THIS_ BSTR*) PURE; STDMETHOD(get_WatermarkURL)(THIS_ BSTR*) PURE; STDMETHOD(get_MoreInfoURL)(THIS_ BSTR*) PURE; STDMETHOD(get_MoreInfoBannerImage)(THIS_ BSTR*) PURE; STDMETHOD(get_MoreInfoBannerURL)(THIS_ BSTR*) PURE; STDMETHOD(get_MoreInfoText)(THIS_ BSTR*) PURE; };To copy to clipboard, switch view to plain text mode
my header section is:
Qt Code:
#include <QtCore/QCoreApplication> #include <iostream> #include <conio.h> #include <stdio.h> #include <qnetwork.h> #include <qnetworkaccessmanager.h>To copy to clipboard, switch view to plain text mode
Can you post the whole main.cpp and error message (including line number) ?
My main.cpp is
Qt Code:
#include <QtCore/QCoreApplication> #include <iostream> #include <conio.h> #include <stdio.h> #include <qnetwork.h> #include <qnetworkaccessmanager.h> int main(int argc, char *argv[]) { QNetworkAccessManager *manager = new QNetworkAccessManager(this); return a.exec(); }To copy to clipboard, switch view to plain text mode
and error messages are
c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\..\..\ ..\..\include\qnetwork.h:16: error: expected constructor, destructor, or type conversion before '(' token
Ya then it compiles successfully....
but qnetwork.h is not hard coded file ... it is a predefined file.....
so how should I look for errors in this file..................?????
Firstly, if your program compiles without it then you don't need it, and don't need to correct errors in it.
Secondly, as advised earlier, qnetwork.h is not part of Qt. It has dependencies that you are missing before the include, specifically:
as in the Microsoft docs clearly states. If there are errors internal to that file (I strongly doubt it) then you need to address that with the author.To define the interface identifier, include the header file Initguid.h before Qnetwork.h, but after Dshow.h and other header files:
Note Make sure that Initguid.h is included only once in your project. Otherwise, you will receive linker errors for duplicate GUID values.Qt Code:
#include <dshow.h> #include <initguid.h> #include <qnetwork.h>To copy to clipboard, switch view to plain text mode
Thanks.. it solves my problem.... But after doing this I am getting one error ... here is
c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\..\..\ ..\..\include\qnetwork.h:46: error: expected unqualified-id before '}' token
and I want to be clear about if qnetwork.h is a part of qt framework or not.......
<qnetwork.h> is not.. Qt has <QtNetwork>
The source you posted is <qnetwork.h> and it isn't a Qt header file.
A camel can go 14 days without drink,
I can't!!!
Bookmarks