[Qt-creator] [newbie] including ext. lib (libqxt) in qtcreator plugin

Coda Highland coda at bobandgeorge.com
Wed Mar 23 18:52:44 CET 2011


Hey, ahigerd here from Qxt.

Don't use the Add Library wizard. Qxt is one of the rare libraries out
there that actually uses the hooks qmake offers to integrate itself in
as if it were a set of Qt modules.

To use Qxt in your project, you need a couple lines that look something like:
CONFIG += qxt
QXT = core network
The first line enables the Qxt hooks; the second line tells qmake that
you want to use the QxtCore and QxtNetwork modules.

Once you have done this, the qmake hooks will add the Qxt libraries to
the linker and the Qxt include directories to the header search path.

/s/ Adam Higerd

P.S. I don't think you cross-posted it correctly because I don't see
this message on the libqxt mailing list.

On Wed, Mar 23, 2011 at 11:40 AM, Thomas Ehrnhoefer
<thomas.ehrnhoefer at tasktop.com> wrote:
> Hi Group
>
> Disclaimer: I am new to libqxt, Qt and QtCreator, so assume the least
> and let me know if the question is misplaced here :)
>
> I am starting on a plugin for QtCreator (adding a sidebar) and want to
> use libqxt in my work (I need the JSON support). The problem I am
> experiencing is that I cannot get the plugin to either compile or run
> with libqxt.
> I used the "Add library..." wizard to add the libs (which are compiled
> and sit in C:/qxt/), which adds a bunch of lines for each of the libs
> I want to my .pro file.
> I also added a simple line to invoke one if the features (opening a
> QxtConfirmationMessage) plus imports of:
> #include "QxtCore/QxtCore"
> #include "QxtGui/QxtGui"
> #include "QxtGui/QxtConfirmationMessage".
>
> Compiling results in the following error:
> c:\qxt\include\qxtcore\qxtabstractconnectionmanager.h(30) : fatal
> error C1083: Cannot open include file: 'qxtglobal.h': No such file or
> directory
>
> The file is there though, sitting in c:\qxt\include\qxtcore. So it
> seems my .pro file is not sufficient (or incorrect) to find everything
> it needs.
>
> Then I read that to add libqxt, one simple needs to add
>
> If I am compiling this, it finishes without an error, but starting
> QtCreator with my plugin pops up a dialog stating it couldn't load my
> library because "the specified module was not found". So again some
> setup problem.
>
> Combining both methods lead to the same result as method 2 by itself.
>
> I am also cross-posting this to the libqxt mailing list (as I am not
> certain which part I am doing wrong).
> Any help is appreciated
>
> Thanks
> Thomas
>
> P.S.: here is my dev environment and how I got qt/qtcreator and libqxt compiled:
> * using MSVC2008 and activeperl
> * configuring Qt with -release -no-scripttools -qt-zlib -qt-gif
> -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -nomake demos -nomake
> examples -phonon -phonon-backend
> * configuring Qxt with -release -no-db
>
> --
> Thomas Ehrnhoefer
> Software Developer, http://tasktop.com
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-creator
>



More information about the Qt-creator-old mailing list