[solved] mingw32-make install doesn't work
-
kqoauth.prl
kqoauthd.prl
kqoauthd0.dll
libkqoauthd0.a -
Ah, sorry, the snippet was not complete. This is the correct one (spot the "-L" before the path!):
@
LIBS += -LC:/kqoauth-kqoauth/lib -lkqoauthd0
@ -
The problem remains
@c:/qt/qtcreator-2.1.84/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lkqoauth@
-
You should change the second one to
@
-lkqoauthd0
@The general rule is: If you have a file libxblurb.a then you must specify -lxblurb to the linker.
-
I found out the LINKAGE-entries in the kqoauth.prf lead to that problem.
The relevant part is this:@# else, link normally
isEmpty(LINKAGE) {
exists($$PWD/kqoauth.pro): INCLUDEPATH += $$KQOAUTH_INCDIR
else: INCLUDEPATH += $$KQOAUTH_INCDIR/QtKOAuth
LIBS += -L$$KQOAUTH_LIBDIR
LINKAGE = -libkqoauthd0
CONFIG(debug, debug|release) {
windows:LINKAGE = -libkqoauthd0
mac:LINKAGE = -lkqoauth_debug
}
}@After I changed -lkqoauth to -libkqoauthd0 as you can see I get this error now:
@c:/qt/qtcreator-2.1.84/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -libkqoauthd0@
-
I would guess, this still puts wrong paths into the library search path.
I would recommend to copy the twitter sample application into a separate directory, do not include the .prf files and adjust the .pro file of the sample as mentioned above. I do not have a running MinGW environment at the moment an so cannot test.
-
I did what you said. It compiles now.
The problem however is that it doesn't display any output. It just ends.According to the main-function it should call showHelp() which should give some output. So I guess something went wrong again. Any ideas?
Here's the main-function:
@int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
QCoreApplication::setOrganizationName("kQOAuth");
QCoreApplication::setApplicationName("TwitterCLI");QStringList args = QCoreApplication::arguments(); TwitterCLI tAuth; if(args.contains("-t")) { if(args.last() != "-t") { tAuth.sendTweet(args.last()); } } else if( args.contains("-a")){ tAuth.getAccess(); } else if (args.contains("-x")) { tAuth.xauth(); } else { tAuth.showHelp(); return 0; } return app.exec();
}@
and here's showHelp
@void TwitterCLI::showHelp() {
QTextStream qout(stdout);
qout << "TwitterCLI, version 0.95. Author: Johan Paul johan.paul@d-pointer.com\n"
<< "\n"
<< "Usage: twittercli -[at] <tweet>\n"
<< " -a Request for access tokens.\n"
<< " -x Use Twitter xAuth to retrieve access tokens.\n"
<< " -t '<tweet>' Send <tweet> to Twitter after retrieving access tokens\n"
<< "\n";
}@ -
Did you step through the debugger? It works for me there.
And watch out: It's a console application, you will not get a window with the message :-)
-
I just tried it. btw. I'm using Qt Creator.
While stepping through it it shows the output (showHelp) but if I simply run it, it shows nothing (not even a qDebug() I set at the beginning of the main-function.Its the same when I start it from the cmd-window -> no output
congrats to your 2.4k-th post :)
-
Ah... damn! the stdout trap on windows! As far as I know you do not have this in the cmd shell of windows, so you'll have to stick to Qt Creator to see this (or just make it a small gui, shouldn't be too hard to make a button for each option and a QTextBrowser for the output)
EDIT: Oh, and thanks for the congrats of course.
-
No, that's all I needed.
I'll implement it straight in my program.
It's working beautiful.