Unsolved Modular library and its paths
-
Library libqxt with my small changes is here: https://github.com/borneq/libqxt
is compilable from batch, but examples still not compilable.
I have added to examples pro "QT += core gui" but is is not enough:
in displaysettingsdialog.h file is #include <QxtScreen>
QxtScreen is in directory libqxt\include\QxtWidgets
but is invisible
https://github.com/borneq/libqxt/blob/dc5798cfecbc454c6486969ed778cebf3d2bb5a4/examples/displaysettings/displaysettingsdialog.h#L4What are rules to add module directories
-
You need
QT += core gui widgets
to get QtWidgets module.And to use
<SomeHeader>
you need to point qmake to it's parent directory usingINCLUDEPATH
. -
Problems:
I add full paths and even add qxtletterboxwidget.cpp with path to my project, but is error::-1: error: No rule to make target 'QxtLetterBoxWidget', needed by 'ui_displaysettingsdialog.h'. Stop.
My pro is:
QT += core gui widgets TEMPLATE = app TARGET = displaysettings DEPENDPATH += . INCLUDEPATH += . INCLUDEPATH += d:/wazne/github_my/libqxt/include INCLUDEPATH += d:/wazne/github_my/libqxt/src/widgets INCLUDEPATH += d:/wazne/github_my/libqxt/src/core CONFIG += qxt QXT += core gui widgets # Input FORMS += displaysettingsdialog.ui HEADERS += displaysettingsdialog.h SOURCES += displaysettingsdialog.cpp main.cpp SOURCES += d:/wazne/github_my/libqxt/src/widgets/qxtletterboxwidget.cpp
-
That's wrong. Qxt is a library, you should have a precompiled dll or lib package. Then use
INCLUDEPATH
to point Qt to the includes, andLIBS
to point it to the libraries.What you did here is a manual compilation of
qxtletterboxwidget.cpp
which won't work. -
Problem is probably with ui, I not used it previous.
I haveLIBS += d:/wazne/github_my/libqxt/lib -lQxtCore -lQxtWidgets
but still the same error.
-
@AndrzejB said in Modular library and its paths:
SOURCES += d:/wazne/github_my/libqxt/src/widgets/qxtletterboxwidget.cpp
Remove that line from .pro file.
-
Removed, instead this is LIBS.
-
Should work, then. Make a full rebuild.
- Is there anything special in "ui_displaysettingsdialog.h"?
- Have you checked if file "QxtScreen" is there in on of the INCLUDEPATHs you added?