#5 ✓resolved
Chris Hills

Problem compiling qTwitter with QOAauth

Reported by Chris Hills | June 24th, 2009 @ 12:10 PM

I have installed QOAuth properly, but qTwitter does not compile successfully (using the oauth branch). The following files exist in my Qt installation:-

/usr/local/Trolltech/Qt-4.5.1/include/QtOAuth
/usr/local/Trolltech/Qt-4.5.1/include/QtOAuth/QtOAuth
/usr/local/Trolltech/Qt-4.5.1/include/QtOAuth/qoauth.h
/usr/local/Trolltech/Qt-4.5.1/include/QtOAuth/qoauth_global.h
/usr/local/Trolltech/Qt-4.5.1/lib/libqoauth.prl
/usr/local/Trolltech/Qt-4.5.1/lib/libqoauth.so
/usr/local/Trolltech/Qt-4.5.1/lib/libqoauth.so.0
/usr/local/Trolltech/Qt-4.5.1/lib/libqoauth.so.0.1
/usr/local/Trolltech/Qt-4.5.1/lib/libqoauth.so.0.1.0
/usr/local/Trolltech/Qt-4.5.1/lib/pkgconfig/qoauth.pc
/usr/local/Trolltech/Qt-4.5.1/share/doc/qoauth-0.1.0
/usr/local/Trolltech/Qt-4.5.1/share/doc/qoauth-0.1.0/html/d2/d90/qoauth_8h.html
/usr/local/Trolltech/Qt-4.5.1/share/doc/qoauth-0.1.0/html/d3/d8e/qoauthglobal_8h-source.html
/usr/local/Trolltech/Qt-4.5.1/share/doc/qoauth-0.1.0/html/dc/db0/qoauth_8h-source.html
/usr/local/Trolltech/Qt-4.5.1/share/doc/qoauth-0.1.0/html/df/d48/qoauthglobal_8h.html

However compiling gives the following message:-

cd twitterapi/ && make -f Makefile 
make[1]: Entering directory /usr/local/home/chaz/git/qtwitter/twitterapi'
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DOAUTH -DTWITTERAPI -DQT_NO_DEBUG -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.5.1/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.5.1/include/QtCore -I/usr/local/Trolltech/Qt-4.5.1/include/QtNetwork -I/usr/local/Trolltech/Qt-4.5.1/include/QtXml -I/usr/local/Trolltech/Qt-4.5.1/include -I. -I../../qtwitter -Itmp -Itmp -I. -o tmp/xmlparser.o xmlparser.cpp
In file included from xmlparser.h:27,

             from xmlparser.cpp:24:



twitterapi.h:35:21: error: QtOAuth: No such file or directory

qtwitter(oauth) git version is b457ca66a0385b21bb9636c7c22feddfa5b8f117

qoauth(master) git version is 2c90be2c4055c5a8fcd65978e76f73c7899211c1

Comments and changes to this ticket

  • ayoy

    ayoy June 24th, 2009 @ 12:43 PM

    • Tag set to compilation, prefix, prf

    Hey Chris,

    my bad, sorry. The file oauth.prf suddenly disappeared from the repository. It's now added back there. So please pull from oauth/master and reinstall the library. It should work, but I have to admit that I haven't tested it on prefixed Qt installations. I'll investigate it further after work.

    Give me a shout if it works for you, thanks!

  • Chris Hills

    Chris Hills June 24th, 2009 @ 03:55 PM

    Thanks for that! I have updated my local repo, but for some reason it installed oauth.prf to /usr/local/Trolltech/Qt-4.5.1/local/Trolltech/Qt-4.5.1/mkspecs/features/oauth.prf instead of /usr/local/Trolltech/Qt-4.5.1/mkspecs/features/oauth.prf. If I move the file after I install qoauth to where it should be, I was able to compile qTwitter fine.

  • ayoy

    ayoy June 24th, 2009 @ 07:54 PM

    • State changed from “new” to “resolved”

    (from [9bc78eb3e0a8e801e83b82c70ca520007adeb69f]) Fixed path of the prf file for prefixed installations. [#5 state:resolved] http://github.com/ayoy/qoauth/commit/9bc78eb3e0a8e801e83b82c70ca520...

  • ayoy

    ayoy June 24th, 2009 @ 07:56 PM

    I installed a prefixed Qt and have the prf file in the same wierd directory as you :) Corrected the project file and pushed the changes. Thanks for reporting the issue!

  • DarkAdmiral

    DarkAdmiral July 2nd, 2009 @ 02:43 PM

    I compiled qoauth succesfully and did "make install".
    But when I try to compile qtwitter I always get this message:
    twitterapi.h:35:21: Error: QtOAuth: File not found
    In file included from xmlparser.h:27,

                 from xmlparser.cpp:24:
    

    twitterapi.h:102: Error: »QOAuth« has not been declared
    twitterapi.h:102: Error: expected »,« or »...« before »method«
    twitterapi.h:115: Error: ISO-C++ verbietet Deklaration von »QOAuth« ohne Typ
    twitterapi.h:115: Error: expected »;« before »« token
    make[1]:
    ** [tmp/xmlparser.o] Fehler 1

    I believe I do something wrong?

  • ayoy

    ayoy July 2nd, 2009 @ 04:22 PM

    Two things:

    1. Are you sure you have the latest git snapshot of qtwitter?
    2. Are you sure you did make uninstall prior to compiling qtwitter?

    If you installed qtwitter from package, uninstall it before you compile the new version. If you installed it from source, try make uninstall, or remove at least /usr/lib/libtwitterapi* and /usr/include/twitterapi*. Then try again with the compilation.

    The problem is that there were changes in libtwitterapi when introducing OAuth support, and when you have qtwitter installed, the linker looks for libraries installed in system prior to taking them from the source code directory. It tries to link against the old library and fails by not finding new symbols.

  • DarkAdmiral

    DarkAdmiral July 2nd, 2009 @ 06:07 PM

    ok removing the two file manually, let it compile.

    thanks

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

Referenced by

Pages