#6 ✓invalid
Maitrey Mishra

Creating own programs using QOAuth library

Reported by Maitrey Mishra | September 17th, 2009 @ 08:32 AM

Hi,

I am trying to write a simple program. My program is dis:

include

include

include

include

include

QByteArray token;
QByteArray tokenSecret;

QOAuth qoauth = new QOAuth;
//set the consumer key and secret qoauth->setConsumerKey( "72pagxrtakm2vdvz9kwkmhxt" );
qoauth->setConsumerSecret( "C2DMEmvVwb" );
// set a timeout for requests (in msecs) qoauth->setRequestTimeout( 10000 );

QOAuth::ParamMap reply =qoauth->requestToken( "http://api.netflix.com/oauth/request_token",QOAuth::GET, QOAuth::HMAC_SHA1 );

// if no error occurred, read the received token and token secret if ( qoauth->error() == QOAuth::NoError )
{ token = reply.value( QOAuth::ParamToken ); tokenSecret = reply.value( QOAuth::ParamTokenSecret ); }

When I compile it gives me the following error:

/usr/include/QtCrypto/qca_cert.h:237: error: ISO C++ forbids declaration of ‘QSharedDataPointer’ with no type /usr/include/QtCrypto/qca_cert.h:237: error: expected ‘;’ before ‘<’ token /usr/include/QtCrypto/qca_cert.h:310: error: ISO C++ forbids declaration of ‘QSharedDataPointer’ with no type /usr/include/QtCrypto/qca_cert.h:310: error: expected ‘;’ before ‘<’ token /usr/include/QtCrypto/qca_cert.h:470: error: ISO C++ forbids declaration of ‘QSharedDataPointer’ with no type /usr/include/QtCrypto/qca_cert.h:470: error: expected ‘;’ before ‘<’ token /usr/include/QtCrypto/qca_cert.h:528: error: expected initializer before ‘<’ token /usr/include/QtCrypto/qca_cert.h:540: error: expected template-name before ‘<’ token /usr/include/QtCrypto/qca_cert.h:540: error: expected {' before ‘<’ token /usr/include/QtCrypto/qca_cert.h:540: error: expected unqualified-id before ‘<’ token /usr/include/QtCrypto/qca_cert.h:570: error: invalid use of incomplete type ‘class QCA::CertificateInfoOrdered’ /usr/include/QtCrypto/qca_cert.h:540: error: forward declaration of ‘class QCA::CertificateInfoOrdered’ /usr/include/QtCrypto/qca_cert.h:575: error: invalid use of incomplete type ‘class QCA::CertificateInfoOrdered’ /usr/include/QtCrypto/qca_cert.h:540: error: forward declaration of ‘class QCA::CertificateInfoOrdered’ /usr/include/QtCrypto/qca_cert.h:583: error: expected initializer before ‘<’ token /usr/include/QtCrypto/qca_cert.h:591: error: ‘QStringList’ does not name a type /usr/include/QtCrypto/qca_cert.h:660: error: ‘CertificateInfo’ does not name a type /usr/include/QtCrypto/qca_cert.h:673: error: ‘Constraints’ does not name a type /usr/include/QtCrypto/qca_cert.h:678: error: ‘QStringList’ does not name a type /usr/include/QtCrypto/qca_cert.h:687: error: ‘QStringList’ does not name a type /usr/include/QtCrypto/qca_cert.h:696: error: ‘QStringList’ does not name a type /usr/include/QtCrypto/qca_cert.h:703: error: ‘QStringList’ does not name a type /usr/include/QtCrypto/qca_cert.h:730: error: ‘QDateTime’ does not name a type /usr/include/QtCrypto/qca_cert.h:737: error: ‘QDateTime’ does not name a type /usr/include/QtCrypto/qca_cert.h:757: error: expected ‘,’ or ‘...’ before ‘&’ token /usr/include/QtCrypto/qca_cert.h:757: error: ISO C++ forbids declaration of ‘CertificateInfo’ with no type /usr/include/QtCrypto/qca_cert.h:774: error: expected ‘,’ or ‘...’ before ‘&’ token /usr/include/QtCrypto/qca_cert.h:774: error: ISO C++ forbids declaration of ‘Constraints’ with no type /usr/include/QtCrypto/qca_cert.h:781: error: expected ‘,’ or ‘...’ before ‘&’ token /usr/include/QtCrypto/qca_cert.h:781: error: ISO C++ forbids declaration of ‘QStringList’ with no type /usr/include/QtCrypto/qca_cert.h:790: error: expected ‘,’ or ‘...’ before ‘&’ token /usr/include/QtCrypto/qca_cert.h:790: error: ISO C++ forbids declaration of ‘QStringList’ with no type /usr/include/QtCrypto/qca_cert.h:799: error: expected ‘,’ or ‘...’ before ‘&’ token /usr/include/QtCrypto/qca_cert.h:799: error: ISO C++ forbids declaration of ‘QStringList’ with no type /usr/include/QtCrypto/qca_cert.h:806: error: expected ‘,’ or ‘...’ before ‘&’ token /usr/include/QtCrypto/qca_cert.h:806: error: ISO C++ forbids declaration of ‘QStringList’ with no type /usr/include/QtCrypto/qca_cert.h:833: error: expected ‘,’ or ‘...’ before ‘&’ token /usr/include/QtCrypto/qca_cert.h:833: error: ISO C++ forbids declaration of ‘QDateTime’ with no type /usr/include/QtCrypto/qca_cert.h:901: error: ‘QDateTime’ does not name a type /usr/include/QtCrypto/qca_cert.h:906: error: ‘QDateTime’ does not name a type /usr/include/QtCrypto/qca_cert.h:925: error: ‘CertificateInfo’ does not name a type /usr/include/QtCrypto/qca_cert.h:953: error: ‘CertificateInfo’ does not name a type /usr/include/QtCrypto/qca_cert.h:972: error: ‘Constraints’ does not name a type /usr/include/QtCrypto/qca_cert.h:979: error: ‘QStringList’ does not name a type /usr/include/QtCrypto/qca_cert.h:986: error: ‘QStringList’ does not name a type /usr/include/QtCrypto/qca_cert.h:993: error: ‘QStringList’ does not name a type /usr/include/QtCrypto/qca_cert.h:998: error: ‘QStringList’ does not name a type /usr/include/QtCrypto/qca_cert.h:1179: error: ISO C++ forbids declaration of ‘QSharedDataPointer’ with no type /usr/include/QtCrypto/qca_cert.h:1179: error: expected ‘;’ before ‘<’ token /usr/include/QtCrypto/qca_cert.h:1182: error: expected ‘,’ or ‘...’ before ‘<’ token /usr/include/QtCrypto/qca_cert.h:1182: error: ISO C++ forbids declaration of ‘QList’ with no type /usr/include/QtCrypto/qca_cert.h:1183: error: expected ‘,’ or ‘...’ before ‘<’ token /usr/include/QtCrypto/qca_cert.h:1183: error: ISO C++ forbids declaration of ‘QList’ with no type /usr/include/QtCrypto/qca_cert.h:874: error: invalid use of incomplete type ‘struct QString’ /usr/include/QtCrypto/qca_tools.h:44: error: forward declaration of ‘struct QString’ /usr/include/QtCrypto/qca_cert.h:1105: error: invalid use of incomplete type ‘struct QString’ /usr/include/QtCrypto/qca_tools.h:44: error: forward declaration of ‘struct QString’ /usr/include/QtCrypto/qca_cert.h:1119: error: invalid use of incomplete type ‘struct QString’ /usr/include/QtCrypto/qca_tools.h:44: error: forward declaration of ‘struct QString’ /usr/include/QtCrypto/qca_cert.h:1134: error: invalid use of incomplete type ‘struct QString’ /usr/include/QtCrypto/qca_tools.h:44: error: forward declaration of ‘struct QString’ /usr/include/QtCrypto/qca_cert.h:1208: error: expected template-name before ‘<’ token /usr/include/QtCrypto/qca_cert.h:1208: error: expected{' before ‘<’ token /usr/include/QtCrypto/qca_cert.h:1208: error: expected unqualified-id before ‘<’ token try_qoauth.cpp:27: error: expected }' at end of input<br/> make: *** [try_qoauth.o] Error 1

Can anyone please help me out?

Comments and changes to this ticket

  • ayoy

    ayoy September 17th, 2009 @ 08:49 AM

    The compilation errors come from QCA, not from QOAuth directly. Do you have CONFIG += oauth in your project file? Also, what version of Qt are you using?

  • Maitrey Mishra

    Maitrey Mishra September 17th, 2009 @ 09:43 AM

    • Assigned user cleared.

    addy@addy-desktop:~/sample_prgs/net$ dpkg -l | grep qt
    ii gtk2-engines-qtpixmap 0.28-1.2build1 QtPixmap GTK2.x theming engine
    rc libavahi-qt3-1 0.6.22-2ubuntu4.1 Avahi Qt 3 integration library
    ii libqt3-mt 3:3.3.8-b-0ubuntu3 Qt GUI Library (Threaded runtime version), V
    ii libqt4-core 4.3.4-0ubuntu3.1 Qt 4 core non-GUI functionality runtime libr
    ii libqt4-dbus 4.5.0-0ubuntu4.2 Qt 4 D-Bus module
    ii libqt4-designer 4.5.0-0ubuntu4.2 Qt 4 designer module
    rc libqt4-gui 4.3.4-0ubuntu3.1 Qt 4 core GUI functionality runtime library
    ii libqt4-help 4.5.0-0ubuntu4.2 Qt 4 help module
    ii libqt4-network 4.5.0-0ubuntu4.2 Qt 4 network module
    ii libqt4-qt3support 4.5.0-0ubuntu4.2 Qt 3 compatibility library for Qt 4
    ii libqt4-script 4.5.0-0ubuntu4.2 Qt 4 script module
    ii libqt4-sql 4.5.0-0ubuntu4.2 Qt 4 SQL module
    ii libqt4-svg 4.5.0-0ubuntu4.2 Qt 4 SVG module
    ii libqt4-test 4.5.0-0ubuntu4.2 Qt 4 test module
    rc libqt4-webkit 4.5.0-0ubuntu4.2 Qt 4 WebKit module
    ii libqt4-xml 4.5.0-0ubuntu4.2 Qt 4 XML module
    ii libqt4-xmlpatterns 4.5.0-0ubuntu4.2 Qt 4 XML patterns module
    ii libqtcore4 4.5.0-0ubuntu4.2 Qt 4 core module
    ii libqtgui4 4.5.0-0ubuntu4.2 Qt 4 GUI module
    ii libqthreads-12 1.6.8-6ubuntu1 QuickThreads library for Guile
    rc libqttelepathyclient0 0.14.1+svn2064-0ubuntu1 client library for Qt4 telepathy
    rc libqttelepathycommon0 0.14.1+svn2064-0ubuntu1 common library for Qt4 telepathy
    rc libqttelepathycore0 0.14.1+svn2064-0ubuntu1 core library for Qt4 telepathy
    ii libqttestrunner1c2a 1.12.0-3ubuntu2 Unit Testing Library for C++
    rc libqtwebkit1d 0~svn29752-1 Web content engine library for Qt
    rc libqwt5-qt4 5.0.2-2 Qt4 widgets library for technical applicatio
    rc libqwtplot3d-qt4 0.2.7+svn191-1 3D plotting library based on Qt4/OpenGL (run
    rc libsmokeqt4-2 4:4.0.3-0ubuntu4 SMOKE Binding Library to Qt 4
    ii qt4-qmake 4.5.0-0ubuntu4.2 Qt 4 qmake Makefile generator tool
    ii qt4-qtconfig 4.5.0-0ubuntu4.2 Qt 4 configuration tool
    addy@addy-desktop:~/sample_prgs/net$

    Yeah I do have it in my .pro file i.e. CONFIG += oauth

    If you cans end me asample program based on QOAuth it would be of really great help!!!Thanks in advance!!

  • Maitrey Mishra

    Maitrey Mishra September 17th, 2009 @ 12:25 PM

    • Assigned user set to “ayoy”

    If possible please do send me a sample program which uses QOauth library. It would be of really great help!!!

  • Maitrey Mishra
  • ayoy

    ayoy September 17th, 2009 @ 02:59 PM

    • State changed from “new” to “open”

    Well, I wrapped your code in main() function and get this working. If it doesn't work for you, then make sure that you have qoauth 1.0 and all the dependencies installed (especially qca2 and qca2-ossl).

  • ayoy

    ayoy September 17th, 2009 @ 03:09 PM

    And, if in doubt, the documentation for 1.0 is hosted here:

    http://files.ayoy.net/qoauth/1.0/doc/

  • ayoy

    ayoy January 17th, 2010 @ 03:16 PM

    • State changed from “open” to “invalid”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

QOAuth is a Qt-based C++ library providing means for communicating with services supporting OAuth authorization scheme.

Shared Ticket Bins

People watching this ticket

Attachments

Pages