[solved] mingw32-make install doesn't work
-
I do not have an SDK installed, so I just can guess.
- put the library (.a/.so/.lib/.dll - whatever it is in MinGW) into the same directory were the respective QtCore, QtGui, etc. counterparts live (this may be lib for the .lib and bin for the .dll files, I don't know)
- put all header files into the include folder where the Qt headers are located
You'll have to repeat this for every Qt version you install afterwards.
I personally would add the paths of the source directory to the .pro file:
@
INCLUDEPATH += C:/kqoauth-kqoauth/include C:/kqoauth-kqoauth/src
LIBS += C:/kqoauth-kqoauth/lib -lkqoauth
@It's just a guess, so please adjust the paths if you need so.
-
your paths were right. However the compiler complains that it can't find -lkqoauth
bq. c:/qt/qtcreator-2.1.84/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lkqoauth
The error message is the same even if I use that instead:
bq. LIBS += C:/kqoauth-kqoauth/lib -lkqoauthd0
-
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";
}@ -
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.